Skip to content

Commit

Permalink
strip protocol prefix when resolving eval event content (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire authored Oct 14, 2024
1 parent 95c99f3 commit a86be2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Google: compatibility with google-generativeai v0.8.3
- Open log files in binary mode when reading headers (fixes ijson deprecation warning).
- Bugfix: strip protocol prefix when resolving eval event content

## v0.3.41 (11 October 2024)

Expand Down
2 changes: 1 addition & 1 deletion src/inspect_ai/log/_transcript.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def content_fn(text: str) -> str:
def eval_events_with_content(events: EvalEvents) -> list[Event]:
def content_fn(text: str) -> str:
if text.startswith(CONTENT_PROTOCOL):
return events.content.get(text, text)
return events.content.get(text.replace(CONTENT_PROTOCOL, "", 1), text)
else:
return text

Expand Down

0 comments on commit a86be2c

Please sign in to comment.