mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
Mc/toolmaxretry (#323)
This commit is contained in:
+5
-2
@@ -92,6 +92,7 @@ def test_override_docs():
|
||||
{
|
||||
"role": "assistant",
|
||||
"content": 'Hello, world![{"id": "test_tool", "function": {"arguments": "", "name": "test_tool"}, "type": "function"}]',
|
||||
"tool_calls": [{"id": "test_tool", "function": {"arguments": "", "name": "test_tool"}, "type": "function"}],
|
||||
},
|
||||
),
|
||||
(
|
||||
@@ -110,6 +111,7 @@ def test_override_docs():
|
||||
{
|
||||
"role": "assistant",
|
||||
"content": '[{"id": "test_tool", "function": {"arguments": "", "name": "test_tool"}, "type": "function"}]',
|
||||
"tool_calls": [{"id": "test_tool", "function": {"arguments": "", "name": "test_tool"}, "type": "function"}],
|
||||
},
|
||||
),
|
||||
(
|
||||
@@ -151,7 +153,7 @@ def test_override_docs():
|
||||
"tool_calls and no content and function_call",
|
||||
ChatCompletionMessage(
|
||||
role="assistant",
|
||||
content=None,
|
||||
content="",
|
||||
function_call=FunctionCall(arguments="", name="test_tool"),
|
||||
tool_calls=[
|
||||
ChatCompletionMessageToolCall(
|
||||
@@ -164,6 +166,7 @@ def test_override_docs():
|
||||
{
|
||||
"role": "assistant",
|
||||
"content": '[{"id": "test_tool", "function": {"arguments": "", "name": "test_tool"}, "type": "function"}]{"arguments": "", "name": "test_tool"}',
|
||||
"tool_calls": [{"id": "test_tool", "function": {"arguments": "", "name": "test_tool"}, "type": "function"}]
|
||||
},
|
||||
),
|
||||
],
|
||||
@@ -173,4 +176,4 @@ def test_dump_message(
|
||||
message: ChatCompletionMessage,
|
||||
expected: ChatCompletionMessageParam,
|
||||
):
|
||||
assert dump_message(message) == expected, name_of_test
|
||||
assert dump_message(message) == expected, name_of_test
|
||||
Reference in New Issue
Block a user