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

What is the current way to export an thread and preload a chat with a team in v0.4 #4327

Open
bih opened this issue Nov 23, 2024 · 2 comments

Comments

@bih
Copy link

bih commented Nov 23, 2024

I'm fairly new to the AutoGen project and we're exploring it for our use case, but as I was prototyping it in a notebook I was wondering what is the way for us to be able to export a chat and preload it in a team. For example:

team = SelectorGroupChat(
    participants=[customer_service_agent, manager_agent, finance_agent],
    allow_repeated_speaker=False,
    model_client=OpenAIChatCompletionClient(model="gpt-4o"),
)

I can do this to get the conversation history

conversation = await team.run(task="Hello I would like a refund!")
print(conversation.messages)

But I would love to be able to export it as JSON

import json

conversation = await team.run(task="Hello I would like a refund!")
print(json.dumps(conversation.messages))

And equally I would love to be able to import the conversation history JSON so anything ran against in team.run()

conversation_history = json.loads(conversation_history_json)
conversation = await team.run(conversation=conversation_history, task="Hi world!")

Also, is it possible to message the agents with nothing (ideally as a specific flag)? We would love to be able to have agents give a meaningful intro message, but this isn't critical - we can build workarounds for this.

Note that this is for the v0.4 release!

@victordibia
Copy link
Collaborator

victordibia commented Nov 23, 2024

Hi @bih ,

We are currently working a memory interface that should help with this for the high level AgentChat API.
These capabilities are being tracked in issue #4039 and #4100 .
Stay tuned.

@bih
Copy link
Author

bih commented Nov 23, 2024

Sounds good, thanks for the quick response!

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

No branches or pull requests

2 participants