mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
test mcp agent
This commit is contained in:
parent
d5765d0193
commit
19d6051dba
1 changed files with 2 additions and 1 deletions
|
@ -42,11 +42,12 @@ async def test_mcp_agent():
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
messages=messages,
|
messages=messages,
|
||||||
tools=tools,
|
tools=tools,
|
||||||
|
tool_choice="required",
|
||||||
)
|
)
|
||||||
print("LLM RESPONSE: ", json.dumps(llm_response, indent=4, default=str))
|
print("LLM RESPONSE: ", json.dumps(llm_response, indent=4, default=str))
|
||||||
|
|
||||||
# Add assertions to verify the response
|
# Add assertions to verify the response
|
||||||
assert llm_response["choices"][0]["message"]["tool_calls"] is not None
|
assert llm_response["choices"][0]["message"]["tool_calls"] is not None
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
llm_response["choices"][0]["message"]["tool_calls"][0]["function"][
|
llm_response["choices"][0]["message"]["tool_calls"][0]["function"][
|
||||||
"name"
|
"name"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue