Add API for perplexity#1649
Conversation
|
Please sign the commit. Thanks |
Signed-off-by: DeleSerna <nadeeshtv@gmail.com>
8aaa846 to
67fccee
Compare
Done. Thank you |
Signed-off-by: deleSerna <nadeeshtv@gmail.com>
Signed-off-by: deleSerna <nadeeshtv@gmail.com>
|
I have tried to use Perplexity in GOAP example and then realized that SONAR API does not allow tool calling.Will try to use https://api.perplexity.ai/v1/agent . Therefore, I need to update my pull request to include those changes. |
|
@johnsonr the request is still in Draft. @deleSerna please advice when ready for review / merge into main branch. |
|
@alexheifetz It's almost ready. Doing final round of testing. I should be able to put it in review by tomorrow. |
Signed-off-by: deleSerna <nadeeshtv@gmail.com>
|
@alexheifetz It's finally ready. Please share your feedback |
Signed-off-by: deleSerna <nadeeshtv@gmail.com>
|
It is running into "g.springframework.ai.retry.NonTransientAiException: 400 - {"error":{"message":"validation failed: input array cannot be empty","type":"invalid_request","code":400}}". I could not immediately spot the mistake. Looking into it. It was perfectly working fine at one point. |
|
@alexheifetz As you can see in my PR, I was trying to leverage existing OpenAIChatModel but IIUC that is not compatible for the v1/Agent API which is what needed to use it with embabel. Therefore, I need to create PerplexityAIChatModel,PerplexityAiApi etc.. from ground up like others. Is that your understanding? I am trying to make sure that I am not in the wrong path before proceeding further. Therefore that also means my claim |
|
@johnsonr @alexheifetz I looked into this further and as far as I understood Spring AI only support the I am checking with Perplexity forum about it . But if I understand correctly, unless Spring AI adds a Perplexity Model, it would not work directly. I am mostly inclined to abandoning my pull request at this point. Let me know what do you think. |
|
@deleSerna Agreed. |
|
|
there is also https://github.com/embabel/embabel-agent-experimental repo. we can create dedicated modules for Perplexity integration. Once ready and works, we will promote to the embabel-agent repo (production repo with Maven Central publishing) |
|
if this works, i can help setting it up. |
|
Add an an API to connect with Perplexity SONAR (https://docs.perplexity.ai/docs/sonar/quickstart#generating-an-api-key) apis
Perplexity is an OpenAI compatible model
Tested locally with
OpenAiCompatibleModelFactoryByokIT.perplexity buildValidated succeeds with valid key