Skip to content

Commit 657705c

Browse files
committed
Add finish reason
1 parent e044243 commit 657705c

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

llms_wrapper/llms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ def query(
423423
ret["n_prompt_tokens"] = usage.prompt_tokens
424424
ret["n_total_tokens"] = usage.total_tokens
425425
response_message = response['choices'][0]['message']
426+
ret["finish_reason"] = response['choices'][0].get('finish_reason', "UNKNOWN")
426427
ret["answer"] = response_message['content']
427428
ret["error"] = ""
428429
ret["ok"] = True

llms_wrapper/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import importlib.metadata
2-
__version__ = "0.1.24"
2+
__version__ = "0.1.25"
33

notebooks/example-config2.hjson

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
{
2323
llm: anthropic/claude-3-opus-20240229
2424
}
25+
{
26+
llm: anthropic/claude-3-7-sonnet-20250219
27+
}
2528
{
2629
llm: mistral/mistral-large-latest
2730
}
@@ -69,4 +72,4 @@
6972
api_key_env: MY_DEEPSEEK_API_KEY
7073
}
7174
}
72-
}
75+
}

0 commit comments

Comments
 (0)