Can Perplexity API support "session" concept? #162
-
In Perplexity API , I cannot find something like "session id" in the return response of API call. It seems that we cannot pass any "session id" in subsequent calls for purpose of searching next content based on the context of first call. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes you can pass in chat history to your API calls by passing in multi turn messages in the message array |
Beta Was this translation helpful? Give feedback.
Yes you can pass in chat history to your API calls by passing in multi turn messages in the message array
"messages": [ { "role": "system", "content": "System prompt" }, { "role": "user", "content": "user message 1" }, { "role": "assistant", "content": "assistant reply 1" }, { "role": "user", "content": "user message 2" }, { "role": "assistant", "content": "assistant reply 2" }, { "role": "user", "content": "user message 3" }