Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to support Reasoning API by siliconflow? #343

Open
strawhatboy opened this issue Feb 5, 2025 · 8 comments
Open

Possible to support Reasoning API by siliconflow? #343

strawhatboy opened this issue Feb 5, 2025 · 8 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@strawhatboy
Copy link

Siliconflow added a field called reasoning_content along with the normal openai api field content when giving response with Deepseek-R1 model:

{"id":"0194d591444f9e2d5d835cd40dfdc31e","object":"chat.completion.chunk","created":1738749854,"model":"deepseek-ai/DeepSeek-R1","choices":[{"index":0,"delta":{"content":null,"reasoning_content":"","role":"assistant"},"finish_reason":null,"content_filter_results":{"hate":{"filtered":false},"self_harm":{"filtered":false},"sexual":{"filtered":false},"violence":{"filtered":false}}}],"system_fingerprint":"","usage":{"prompt_tokens":918,"completion_tokens":1,"total_tokens":919}}

after reasoning, the content is available and reasoning_content is null:

{"id":"0194d591444f9e2d5d835cd40dfdc31e","object":"chat.completion.chunk","created":1738749854,"model":"deepseek-ai/DeepSeek-R1","choices":[{"index":0,"delta":{"content":"模型异步","reasoning_content":null,"role":"assistant"},"finish_reason":null,"content_filter_results":{"hate":{"filtered":false},"self_harm":{"filtered":false},"sexual":{"filtered":false},"violence":{"filtered":false}}}],"system_fingerprint":"","usage":{"prompt_tokens":918,"completion_tokens":1020,"total_tokens":1938}}
@n4ze3m
Copy link
Owner

n4ze3m commented Feb 5, 2025

Yes, the same goes for the DeepSeek API. Reasoning tokens are now available on reasoning_content. This will be fixed in the coming release. :)

@n4ze3m n4ze3m added bug Something isn't working enhancement New feature or request labels Feb 5, 2025
@dentistfrankchen
Copy link

Can you also support openrouter? With openrouter, we can run many third-party models in low price.
I already see the icon, but the reply is an error:

Image

The console is:

Image

@n4ze3m
Copy link
Owner

n4ze3m commented Feb 5, 2025

I will add the ability to turn off Ollama model fetching from the Ollama settings in the next update

@dentistfrankchen
Copy link

dentistfrankchen commented Feb 5, 2025

Thanks for reply! I think the problem is because the app is trying to fetch from openrouter, but the openrouter interacts with this app in an uncorrect way. I hope you can check whether the app can interact with openrouter api normally(when adding knowledge) and fix this.
Now the openrouter is OK when doing solo, however the error would show up if you add knowledge to it.( Adding a pdf to knowledge can reproduce this error. --Shown by the image below)

Image

Here's the knowledge.

Image

@dentistfrankchen
Copy link

dentistfrankchen commented Feb 6, 2025

I should also add this only happens when we use the knowledge function.

If I turn off knowledge, there will not be any fetches from OLLAMA and the app would only use openrouter.

Image

(The first dialog is generated if you turn on knowledge; the third is when I turn knowledge off.)

Also, I have some problem with the app's logic.
Just as you have mentioned in #336 , the embedding file is stored in the browser. So theoretically there shouldn't be any fetches from ollama if I open openrouter as the chat model.
But now it looks like:

Image
So maybe you need to deeply check the logic of the request with embeddings. I hope everything would go well! Sorry for bothering! @n4ze3m

@n4ze3m
Copy link
Owner

n4ze3m commented Feb 6, 2025

It's okay, @dentistfrankchen. Feel free to ask any questions—happy to answer! This issue will be fixed in the Sunday update. There will be an option to fully turn off Ollama. Page Assist is designed to use the Ollama API, which is why it tries to fetch Ollama.

@n4ze3m n4ze3m mentioned this issue Feb 8, 2025
@dentistfrankchen
Copy link

dentistfrankchen commented Feb 10, 2025

Hi, I have tried 1.5.0. Thanks for your work but the issue still persists.
Now there are new problems.

Image

Why the app fetches embedding model from openrouter? I suppose the embedding(knowledge) is already stored locally.
Also, I cannot find the switch to "fully turn off" ollama. Though this switch feature is not strongly needed, just reporting it...

@n4ze3m
Copy link
Owner

n4ze3m commented Feb 10, 2025

tbh, I missed this issue. I will fix it in the next release—sorry about that.

Which embedding model are you using for RAG? Is it from OpenRouter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants