Skip to content

Made a new method stream in agent.py#3

Open
Greyen wants to merge 2 commits intohexo-ai:masterfrom
Greyen:master
Open

Made a new method stream in agent.py#3
Greyen wants to merge 2 commits intohexo-ai:masterfrom
Greyen:master

Conversation

@Greyen
Copy link

@Greyen Greyen commented Jan 14, 2025

  1. Made a new method stream to show the streamline flow of conversations between Tools/Agents , Model(AI) and User.
  2. Made helper functions like prettyPrint to modify the ChatCompletionMessage into a readable representation.
  3. Made class ToolCall and InvalidToolCall to make sure the format of Tool_calls is correct in ChatCompletionMessage for pretty print. Same for class InvalidToolCall if key 'error ' comes in ChatCompletionMessage for some wrong Tool_calls
  4. Made change in single_agent_example.py to exit if the user wants to exit earlier have to delete the terminal to exit , user can write 'exit' or 'quit' in the query to exit from the conversations.
  5. Add a new (history_stream:List) for this stream method . With the help of this user will not manually add the response like now it is single_agent_example.py
    6 To run the stream method , user only have to uncomment the client.stream(agent,input) and comment the response .

FutureWork can be ->

  1. Using thread or Config make a new chat conversations for the user .In this new chat , model will not able to remember the previous chat's messages. Basically we have to map new thread id's to new (history_stream:List).
  2. Make a method so that user have not do comment manually response in order to run stream method.

Below is the new readable representation of conversations
Screenshot 2025-01-15 at 2 05 41 AM

Hope you find it well and also right now i am working in the domain of Agentic NaturalLanguage to SQL , it will be great to have your guidance on this topic.

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.

1 participant