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

v2.4 #199

Merged
merged 36 commits into from May 5, 2024
Merged

v2.4 #199

merged 36 commits into from May 5, 2024

Conversation

ashpreetbedi
Copy link
Contributor

@ashpreetbedi ashpreetbedi commented Apr 29, 2024

  • Remove LLM Task
  • Add Async Run
  • Add Messages Param
  • Add Workflows

#
# -*- List of messages added to the messages list after the system prompt.
# Use these for few-shot learning or to provide additional context to the LLM.
add_messages: Optional[List[Union[Dict, Message]]] = None

Choose a reason for hiding this comment

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

This feels a bit confusing for me. Could be additional_messages instead? add_messages feel like a method for adding messages to a list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sandangel agree, will update it to be additional_messages

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sandangel looking for a better name for this param :/

Comment on lines 209 to 210
def streamable(self) -> bool:
return self.output_model is None

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sandangel this is on the list for us to implement :) maybe i hack on it tonight :)

@sandangel
Copy link

For arun, I feel it's repeating run code. Can we just code arun, then turn run into asyncio.run(self.arun(...))?

Assistant(
llm=OpenAIChat(model="gpt-3.5-turbo", stop="</answer>"),
system_prompt="What is the color of a banana? Provide your answer in the xml tag <answer>.",
add_messages=[{"role": "assistant", "content": "<answer>"}],

Choose a reason for hiding this comment

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

Suggested change
add_messages=[{"role": "assistant", "content": "<answer>"}],
additional_messages=[{"role": "assistant", "content": "<answer>"}],

Maybe a mypy type check would catch this bug.

@sandangel
Copy link

Is there a design document we can share for the team feature? It seems like we just renamed it to Workflow. I found that new concept is a bit confusing, from the crewai or autogen design POV.

tools=[get_user_details],
show_tool_calls=True,
)

hn_assistant = Assistant(name="HackerNews Assistant", team=[hn_top_stories, hn_user_researcher], debug_mode=True)
hn_assistant.print_response("Tell me about the users with the top 2 stores on hackernews?", markdown=True)
hn_team = Workflow(

Choose a reason for hiding this comment

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

Suggested change
hn_team = Workflow(
hn_workflow = Workflow(

@ashpreetbedi ashpreetbedi merged commit 69ce824 into main May 5, 2024
1 check passed
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.

None yet

2 participants