-
Notifications
You must be signed in to change notification settings - Fork 5
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
code 501, message Unsupported method ('GET') #3
Comments
It looks like that the app you used requires the GET endpoint of |
I could not find that endpoint in OpenAI's API docs either. But this is a common request that I see in the logs for Ollama and LM Studio, but after the apps I using have a value from that GET request it's just used as a label for the model in use. Perhaps I can clone this repo just to handle this GET request and return any/some model name. My use case is mostly for NovelCrafter and a few RAG setups, which connect to a local chat/inference model such as Mistral or Mixtral or Westlake. This saves me money instead of using OpenAI API or Claude, which gets expensive. I do want to use my new macbook more and with MLX ... so thanks for your work. |
hey there, just to weigh in on the conversation, since this is an issue caused by my app: the tags endpoint is specific to ollama, not openai. However, is there a way to add support for the OpenAI models endpoint? My app relies on the server returning a list of the model(s) people can call. even if it's just the one being loaded on start, that's fine. |
I think it should be easy to add models list endpoint https://platform.openai.com/docs/api-reference/models/list |
By me cloning the repo or will you be adding this? Either way is fine, thanks. |
Yes, I can add it if I have some time tomorrow. |
I copied the inaccurate logs before, it should have been the openai and not ollama, like this: mlx-llm-server --model "mistralai/Mistral-7B-Instruct-v0.2" Fetching 11 files: 100%|███████████████████████████████████| 11/11 [00:00<00:00, 56471.66it/s] ... this GET, as you guys pointed out, is in the OpenAI docs/specs. |
Would you try running |
It did fix the GET request and it now returns the correct model id/name, but then this happens:
Perhaps this is related to the app novelcrafter, so more research is needed, as this still works properly:
But thank you for your efforts, and here's hoping the added GET will be helpful to others. |
The error occurred because the Mistral chat template doesn't support system prompts. However, this error shouldn't cause the request to fail; it should just be a warning. If you try another model that supports system prompts, the error will disappear. |
pip install mlx-llm-server
Works fine via curl.
But some apps use a request to get a list of available models. The same as OpenAI's API does.
This causes an issue and most apps respond with a message similar to:
No Models found
This could mean that the connection is not configured correctly or that the vendor did not return any models.
If applicable, make sure that CORS is enabled on the vendor's side.
mlx-llm-server --model "mistralai/Mistral-7B-Instruct-v0.2"
Fetching 11 files: 100%|██████████████████████████████████████████| 11/11 [00:00<00:00, 225060.21it/s]
Starting httpd at 127.0.0.1 on port 8080...
127.0.0.1 - - [01/Mar/2024 15:50:45] "POST /v1/chat/completions HTTP/1.1" 200 -
127.0.0.1 - - [01/Mar/2024 15:52:09] "POST /v1/chat/completions HTTP/1.1" 200 -
127.0.0.1 - - [01/Mar/2024 15:56:01] "OPTIONS /api/tags HTTP/1.1" 204 -
127.0.0.1 - - [01/Mar/2024 15:56:01] code 501, message Unsupported method ('GET')
127.0.0.1 - - [01/Mar/2024 15:56:01] "GET /api/tags HTTP/1.1" 501 -
Thoughts?
Thanks
The text was updated successfully, but these errors were encountered: