Skip to content

How to implement continuous dialogue with api #164

Description

@MaxwellEdisons

How to use the api to achieve contextual continuous dialogue like ChatGPT , such as the first call to the API to ask you what your name is, and the second re-request to get a different result. I tried to use ChatGPT to answer this question and it told me that I could take a conversation_id parameter, but I was prompted with an error when I actually used it.please help me, This is important

Activity

  1. hallacy commented on Jan 1, 2023

    @hallacy
    Contributor

    Hi @winddack! Thanks for writing in.

    Unfortunately, there is no conversation_id parameter for our API. Our official API documentation can be found here: https://beta.openai.com/docs/api-reference/completions.

    You should be able to able to achieve what you're looking for by sending in multiple requests, each with the previous prompt+generation as the new prompt.

    You can also find more help in our discord community, help.openai.com, or community.openai.com

  2. MaxwellEdisons commented on Jan 6, 2023

    @MaxwellEdisons
    Author

    thank you,i will try it

  3. MaslinuPoimal commented on Mar 3, 2023

    @MaslinuPoimal

    @hallacy How can we hold longer conversations this way? If we have to provide the full history every time, we will very quickly hit the 4096 prompt token limit.

  4. thisIsTheFoxe commented on Aug 30, 2023

    @thisIsTheFoxe

    @hallacy thanks for the answer, just to confirm: the id we get from a openai.ChatCompletion.create response has nothing to do and cannot be used as conversation_id?

    You should be able to able to achieve what you're looking for by sending in multiple requests, each with the previous prompt+generation as the new prompt.

    While that definitely works (thanks), it is very expensive because each time the entire previous conversation is counted as new input tokens isn't it? Would be great to have a more efficient way to have a continuous conversation/dialogue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions