-
Notifications
You must be signed in to change notification settings - Fork 350
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
[Bug]: #374
Comments
@fahdmirza Thanks for your attention. The text box is used to give the user input in jupyter. In this example, the user (you) is talking to an agent equipped with some tools. The following code snippet in your code describes the order of speech, which requires the user to speak first. So just input something in the text box (like hello or sth), and then the agent will give a feedback. # ...
x = None
while True:
x = user(x)
if x.content == "exit":
break
x = agent(x) If you want to adjust the order (agent speaks first), just modify the above code as follows: # ...
x = None
while True:
x = agent(x)
x = user(x)
if x.content == "exit":
break |
Sorry @DavdGao , my question and issue is different. How do I call the function from the main python code? Please check my original post again. Thanks. |
Sorry, but I'm a little confused about "call the function from the main python code". However, in ReAct Agent example, the tool function The following is the combined system prompt of this react agent (
If you want the agent to call the function, just ask it to finish some tasks that may require this tool function. For example, I ask the react agent to solve a complex calculation problem, and it will call the Hope this could answer your question. |
@DavdGao Thanks for your response. I tried but its not doing anything. Is it possible to get an end-to-end example please? I am trying to review agentscope for my channel https://www.youtube.com/@fahdmirza . Thanks. |
Please provide more information, for example, the running log. I have tried your code in the issue description, and asked the agent to calculate a number as shown in the following video. In the beginning, the llama3.1 model responds in the correct format and the function executes successfully. However, llama3.1 fails to generate a final respond with the tag 2.mp4 |
Hi, |
Hello,
I am just trying to create a simple end to end example to call a python function from agentscope. When I run it in jupyter notebook, it runs fine and gives me text box. I am confused as how to call that function now, or in other words how to use this? I have tried documentation (which can be greatly improved) but couldn't find any help there. Following is my code:
Please advise.
The text was updated successfully, but these errors were encountered: