Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Can Perplexity API support "session" concept? #162

Answered by shubhang98
rupzhou asked this question in Q&A
Discussion options

You must be logged in to vote

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" }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shubhang98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants