Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: follow conversations #25

Merged
merged 1 commit into from
Jul 27, 2024
Merged

feat: follow conversations #25

merged 1 commit into from
Jul 27, 2024

Conversation

Strvm
Copy link
Owner

@Strvm Strvm commented Jul 27, 2024

For:

#22
#14

Can now continue prompting inside the same conversation:

meta = MetaAI()
resp = meta.prompt("what is 2 + 2?", stream=False)
print(resp)

resp = meta.prompt("what was my previous question?", stream=False)
print(resp)
{'message': '2 + 2 = 4\n', 'sources': [], 'media': []}
{'message': 'Your previous question was "what is 2 + 2?"\n', 'sources': [], 'media': []}

To generate a new conversation, you can specify new_conversation=True inside prompt method:

meta = MetaAI()
resp = meta.prompt("what is 2 + 2?", stream=False)
print(resp)

resp = meta.prompt("what was my previous question?", stream=False, new_conversation=True)
print(resp)
{'message': '2 + 2 = 4\n', 'sources': [], 'media': []}
{'message': "This is the beginning of our conversation, so I don't have a previous question to refer to. I'm happy to chat with you, though! What's on your mind today?\n", 'sources': [], 'media': []}

@Strvm Strvm merged commit 93eca87 into main Jul 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant