Closed luixiao0 closed 2 weeks ago
This is really awesome thank you!
What do you think about explicitly adding a
chat_endpoint
and agenerate_endpoint
in the config options for Ollama instead of justendpoint
? We do this for every other API backend. If a user uses Ollama remotely are we sure they will have chat at/api/chat
and generate at/api/generate
?
I think Adding separate chat_endpoint and generate_endpoint for Ollama isn't necessary for now because once Ollama is running, it provides both chat and generate functionalities at /api/chat and /api/generate. But it is Fine to have 2 config options, providing better consistency across providers
If you can make the suggested changes and resolve the merge conflict I will merge it in! Thank you!
Sorry, I misunderstood your suggestion. The suggested changes have been committed.
Sorry, I misunderstood your suggestion. The suggested changes have been committed.
Don't apologize you are totally fine. I think we are having some issues communicating. If you scroll to the top of the page, you will see I have added some suggestions for changes. You can click commit on those directly, or you can add them yourself. Please verify they work and I will merge the PR. Thank you for your contributions!
Thanks for testing it locally. These are the suggestions I am talking about:
We shouldn't call it completions_endpoint
as Ollama calls it generate. I liked the defaults you had before.
If you can commit those suggestions and test it, I will merge it!
Is github not working as intended? i cannot see them on my side, nor my mailbox, i will make the change shown in your screenshot
I liked the defaults you had before.
i will revert them at next commit
suggested by gpt-4o: try "submitreview"
Is github not working as intended? i cannot see them on my side, nor my mailbox, i will make the change shown in your screenshot
I liked the defaults you had before.
i will revert them at next commit
suggested by gpt-4o: try "submitreview"
Oh super strange. I have attached the two other suggestions that I made.
Is github not working as intended? i cannot see them on my side, nor my mailbox, i will make the change shown in your screenshot
I liked the defaults you had before.
i will revert them at next commit
suggested by gpt-4o: try "submitreview"
Oh super strange. I have attached the two other suggestions that I made.
I've addressed the suggested modifications and it's ready for your feedback
Looks pretty good!
You should be able to change:
.post(self
.configuration
.generate_endpoint
.as_ref()
.unwrap_or(&"http://localhost:11434/api/generate".to_string())
To:
.post(self.configuration.generate_endpoint.as_deref().unwrap_or("http://localhost:11434/api/generate"))
my bad, it's done, never heard of deref before
No worries! Awesome work, I'm going to test locally and merge it tonight!
Thanks for contributing!
This is really awesome thank you!
What do you think about explicitly adding a
chat_endpoint
and agenerate_endpoint
in the config options for Ollama instead of justendpoint
? We do this for every other API backend. If a user uses Ollama remotely are we sure they will have chat at/api/chat
and generate at/api/generate
?