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

Manage sessions and context #174

Open
ricardok1 opened this issue Feb 9, 2024 · 1 comment
Open

Manage sessions and context #174

ricardok1 opened this issue Feb 9, 2024 · 1 comment

Comments

@ricardok1
Copy link

Hi there

Thanks for excellent work.

  1. Sessions - I'm a bit lost how to continue a conversation and have multiple at same time - ask, answer, ask, answer, etc

  2. Context - how to give the context for the questions on a broader level (documents, sites, text, etc)

Thanks
Ricardo

@johniwasz
Copy link
Owner

Thanks for the kind words!

The API does not maintain session state on the server and requires resending the history of the requests and responses in the same message which becomes costly. The payment model is based on the number of words the AI models consume and produce. Unfortunately, this isn't a cost-effective strategy.

I suggest reviewing the OpenAI documentation.

This provides some guidance about bringing in external sources:

Instruct the Model to Answer Using a Reference Text

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

No branches or pull requests

2 participants