Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor agent create assistant api #1142

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lkk12014402
Copy link
Collaborator

Description

  1. instantiate agent when request http://${ip_address}:9091/v1/assistants
  2. allow user to config agent through api call

related to this #982

@lkk12014402
Copy link
Collaborator Author

test

curl http://${ip_address}:9091/v1/assistants -X POST -H "Content-Type: application/json" -d '{
     "agent_config": {"llm_engine": "tgi", "llm_endpoint_url": "http://10.7.4.56:8085/", "tools": "/home/user/comps/agent/src/tools/custom_tools.yaml"}
    }'

curl http://${ip_address}:9091/v1/threads -X POST -H "Content-Type: application/json" -d '{}'

curl http://${ip_address}:9091/v1/threads/thread_5c36add6-3318-45a0-828a-b4df8b486b54/messages -X POST -H "Content-Type: application/json" -d '{"role": "user", "content": "What is OPEA project?"}'

curl http://${ip_address}:9091/v1/threads/thread_5c36add6-3318-45a0-828a-b4df8b486b54/runs -X POST -H "Content-Type: application/json" -d '{"assistant_id": "assistant_ReActAgentLlama_19da8466-8d61-4846-8ecb-732ae2d65646"}'

image

Copy link
Collaborator

@minmin-intel minmin-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update UT with the tests in your screenshot?

@lkk12014402 lkk12014402 removed the request for review from ftian1 January 15, 2025 03:06
@lkk12014402 lkk12014402 added this to the v1.2 milestone Jan 15, 2025
@lkk12014402
Copy link
Collaborator Author

Can you please update UT with the tests in your screenshot?

update ut script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants