-
Notifications
You must be signed in to change notification settings - Fork 271
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
Add vllm custom model support for OpenAI compatibility #224
Comments
Should work the same as ollama, see the code here - #112 (comment). Happy to consider adding vllm as another custom model, but it would need more people to want it before we do the work. |
See #239, that would mean we could add |
Ola! I was testing pydantic.ai alongside vLLM and llama.cpp server, which I think both fulfill the rules for adding a new model. I have looked at the existing Ollama code and I am not sure I understand the value of adding a new I got this same snippet working with both vLLM and llama.cpp server out of the box: # For example with llama.cpp:
docker run -v ./models:/models -p 8080:8080 \
ghcr.io/ggerganov/llama.cpp:server -m /models/smollm2-360m-instruct-q8_0.gguf from pydantic_ai import Agent
from pydantic_ai.models.openai import OpenAIModel
model = OpenAIModel(
"mymodel",
base_url="http://localhost:8080/v1",
api_key="foo"
)
agent = Agent(
model=model,
system_prompt='Be concise, reply with one sentence.',
)
result = agent.run_sync('Where does "hello world" come from?')
print(result.data) So, is it better to just send a small documentation patch? pd. I don't have a problem on contributing a new |
Hi,
Is there a way where we can add the vLLM OpenAI compatibility support.
vllm OpenAI Support
So that anyone can use any llm model calls.
The text was updated successfully, but these errors were encountered: