xqdoo00o / ChatGPT-to-API

Scalable unofficial ChatGPT API for production.
648 stars 129 forks source link

Obtain conversatoin_id and message_id #72

Open kqvanity opened 1 month ago

kqvanity commented 1 month ago

So far, when sending requests to the completions endpoint, it doesn't save the queries in any conversation. I'd like to save them for two reasons. For one, It'd be convenient to refer to them later on, and secondly, I'd want to refer to the AI responses using its saved/returned conversation_id and message_id. so far Handler terminates due at max_tokens and nightmare only returns the msgId

that's my curl request

curl http://localhost:8080/v1/chat/completionz \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-3.5",
    "messages": [
      {
        "role": "system",
        "content": "helper of me"
      },
      {
        "role": "critic",
        "content": "what is atmospheric metal"
      }
    ]
  }' 
  --output binary.mp3

tl;dr be able to retrieve continue_info so that I'd be able to read the response out loud with the syntehesize segment of TTS