Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

Commit

Permalink
refacto
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Jan 11, 2025
1 parent d4cc23f commit 2bcae30
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 36 deletions.
34 changes: 0 additions & 34 deletions examples/evals.py

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
chat = ChatOpenAI(
callbacks=[handler1, handler2],
)
chat.invoke("Write a random string of 4 letters")
chat.stream("Write a random string of 4 letters")
2 changes: 1 addition & 1 deletion lunary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,7 @@ def on_llm_end(
run_id = run_manager.end_run(run_id)

token_usage = (response.llm_output or {}).get("token_usage", {})

parsed_output: Any = [
(
_parse_lc_message(generation.message)
Expand All @@ -1136,7 +1137,6 @@ def on_llm_end(
for generation in response.generations[0]
]

# if it's an array of 1, just parse the first element
if len(parsed_output) == 1:
parsed_output = parsed_output[0]

Expand Down

0 comments on commit 2bcae30

Please sign in to comment.