mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-16 12:47:19 +08:00
Go: implement provider: Perplexity (#15008)
## What - Add Perplexity as a chat and embedding provider backed by its OpenAI-compatible `/chat/completions` and `/v1/embeddings` APIs - Register Perplexity in the Go model factory and provider config - Support non-streaming chat, SSE streaming chat, embeddings, model listing, and connection checks Refs #14736 --------- Co-authored-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
60
conf/models/perplexity.json
Normal file
60
conf/models/perplexity.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"name": "Perplexity",
|
||||
"url": {
|
||||
"default": "https://api.perplexity.ai"
|
||||
},
|
||||
"url_suffix": {
|
||||
"chat": "v1/sonar",
|
||||
"embedding": "v1/embeddings",
|
||||
"models": "v1/models"
|
||||
},
|
||||
"class": "perplexity",
|
||||
"models": [
|
||||
{
|
||||
"name": "sonar",
|
||||
"max_tokens": 127072,
|
||||
"model_types": [
|
||||
"chat"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sonar-pro",
|
||||
"max_tokens": 200000,
|
||||
"model_types": [
|
||||
"chat"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sonar-reasoning-pro",
|
||||
"max_tokens": 127072,
|
||||
"model_types": [
|
||||
"chat"
|
||||
],
|
||||
"thinking": {
|
||||
"default_value": true,
|
||||
"clear_thinking": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sonar-deep-research",
|
||||
"max_tokens": 127072,
|
||||
"model_types": [
|
||||
"chat"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pplx-embed-v1-0.6b",
|
||||
"max_tokens": 32000,
|
||||
"model_types": [
|
||||
"embedding"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pplx-embed-v1-4b",
|
||||
"max_tokens": 32000,
|
||||
"model_types": [
|
||||
"embedding"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user