agentic system client sdk

This commit is contained in:
Xi Yan 2024-09-09 11:46:08 -07:00
parent b7b8f5c2c3
commit 8c378fadcc

View file

@ -34,15 +34,17 @@ def main(host: str, port: int):
# TODO(xiyan): This does not work with current server, need to wrap it in a request (similar to AgentConfig?) # TODO(xiyan): This does not work with current server, need to wrap it in a request (similar to AgentConfig?)
response = client.agentic_system.turns.create( response = client.agentic_system.turns.create(
agent_id=agentic_system_create_response.agent_id, request={
session_id=agentic_system_create_session_response.session_id, "agent_id": agentic_system_create_response.agent_id,
messages=[ "session_id": agentic_system_create_session_response.session_id,
UserMessage(content="What is the capital of France?", role="user"), "messages": [
], UserMessage(content="What is the capital of France?", role="user"),
stream=True, ],
"stream": False,
}
) )
# print(response) print(response)
if __name__ == "__main__": if __name__ == "__main__":