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

support ollama generate reponose when code completions. #517

Open
linpan opened this issue Apr 27, 2024 · 2 comments
Open

support ollama generate reponose when code completions. #517

linpan opened this issue Apr 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@linpan
Copy link

linpan commented Apr 27, 2024

What happened?

curl http://localhost:11434/api/generate -d '{
"model": "llama2",
"prompt": "Why is the sky blue?"
}'
Response
A stream of JSON objects is returned:

{
"model": "llama2",
"created_at": "2023-08-04T08:52:19.385406455-07:00",
"response": "The",
"done": false
}

error:
CleanShot 2024-04-27 at 14 35 23

Relevant log output or stack trace

No response

Steps to reproduce

No response

CodeGPT version

2.4.0

Operating System

None

@linpan linpan added the bug Something isn't working label Apr 27, 2024
@PhilKes
Copy link
Contributor

PhilKes commented Apr 27, 2024

#510 will introduce Ollama as a high-level service and use its native API to support code-completions

@boswelja
Copy link
Contributor

To add to that, specifying api/generate doesn't work because the request and response formats don't match OpenAI services. Currently, using OpenAI-compatible APIs is a requirement

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

No branches or pull requests

3 participants