Replies: 1 comment
-
|
Yes, AG2 works great with local OpenAI-compatible providers. Here's how to set it up: vLLM Setupfrom autogen import ConversableAgent
config_list = [{
"model": "meta-llama/Llama-3.1-8B-Instruct",
"base_url": "http://localhost:8000/v1",
"api_key": "not-needed" # vLLM doesn't require a key
}]
agent = ConversableAgent(
name="local_agent",
llm_config={"config_list": config_list}
)Ollama Setupconfig_list = [{
"model": "llama3.1",
"base_url": "http://localhost:11434/v1",
"api_key": "ollama"
}]Production Tips
vllm serve meta-llama/Llama-3.1-8B-Instruct \\
--max-model-len 8192 \\
--gpu-memory-utilization 0.9I've been running AG2 + vLLM for agent workflows and it works well. The main gotcha is ensuring your model handles system prompts correctly - some quantized models struggle with AG2's structured prompts. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, is it possible to use ag2 with a local LLM provider that implements the OpenAI API, such as Ollama or vLLM?
Beta Was this translation helpful? Give feedback.
All reactions