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

Add a run api? #35

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add a run api? #35

wants to merge 1 commit into from

Conversation

qingyun-wu
Copy link

Why are these changes needed?

In many scenarios, we may just want to involve one single agent to finish a straightforward task. Currently, we need to do that through generate_reply, which is not easy to use. To improve usability, shall we add this run API? This addition won't break the existing usage of generate_reply.

The change in this PR is an initial proposal. If we agree we should add this run API, there are more changes to be made.

Related issue number

Checks

@marklysze
Copy link
Collaborator

I think this would be useful! Looks straightforward - one thought is whether it's called run or chat, feels a bit like chatting with an agent.

@randombet
Copy link
Collaborator

I think this would be useful! Looks straightforward - one thought is whether it's called run or chat, feels a bit like chatting with an agent.

Agree 'run' sounds ambiguous. We need make this self explanatory. What is the use case here?

@qingyun-wu
Copy link
Author

I think this would be useful! Looks straightforward - one thought is whether it's called run or chat, feels a bit like chatting with an agent.

Agree 'run' sounds ambiguous. We need make this self explanatory. What is the use case here?

The use case is we just want one agent to generate a reply. Almost same use cases as the current generate_reply api. But both the name generate_reply and the arguments of generate_reply are complex. Find a comparison below.

Screenshot 2024-09-10 at 9 48 07 AM

self,
message: str,
sender: Optional["Agent"] = None,
):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add the return type here to be more explicit?

@marklysze
Copy link
Collaborator

I think this would be useful! Looks straightforward - one thought is whether it's called run or chat, feels a bit like chatting with an agent.

Agree 'run' sounds ambiguous. We need make this self explanatory. What is the use case here?

The use case is we just want one agent to generate a reply. Almost same use cases as the current generate_reply api. But both the name generate_reply and the arguments of generate_reply are complex. Find a comparison below.

How about respond?

@sonichi
Copy link
Collaborator

sonichi commented Sep 13, 2024

One clarification I'd like to ask is what happens when the same API is invoked twice consecutively. Is it allowed? Does it restart or continue the conversation? It's ambiguous from the api name.
Also remember that we have an API send which is less ambiguous and allows a simple message to be the input. We can add a default_user_proxy which can be imported from the library and let users do default_user_proxy.send to be the one-liner.

odoochain pushed a commit to odoochain/autogen that referenced this pull request Nov 10, 2024
* add tool call to chat completion agent

* refactor function executor; tool executor in chat completion agent

* update example

* update orchestrator chat demo

* handle function execution result message type

* format

* temp fix for examples.

* fix

* update chat completion agent
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.

4 participants