mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +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"),
|
||||
messages=messages,
|
||||
tools=tools,
|
||||
tool_choice="required",
|
||||
)
|
||||
print("LLM RESPONSE: ", json.dumps(llm_response, indent=4, default=str))
|
||||
|
||||
# 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"][0]["function"][
|
||||
"name"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue