Skip to main content

Model Configuration

The models are configured in config/model_config.json.

Specifies the LLMs and embedding models used by the simulator:

{
"chat": [
{
"provider": "openai", // LLM provider: OpenAI
"config_name": "openai-gpt4o", // Configuration identifier
"model_name": "gpt-4o", // Model name
"api_key": "sk-xxx", // API key
"generate_args": {
"temperature": 0 // Temperature setting (0 = deterministic)
}
},
{
"provider": "vllm", // LLM provider: vLLM for local deployment
"config_name": "vllm-qwen", // Configuration identifier
"model_name": "Qwen2.5-14B-Instruct", // Model name or path
"client_args": {
"base_url": "http://localhost:9889/v1/" // Local API endpoint
},
"generate_args": {
"temperature": 0 // Temperature setting
}
}
],
"embedding": [
{
"provider": "vllm",
"config_name": "embedding-bert", // Configuration identifier
"model_name": "bge-base-en-v1.5", // Embedding model name or path
"client_args": {
"base_url": "http://localhost:9890/v1/" // Local API endpoint
}
}
]
}

Supported Providers

YuLan-OneSim supports the following LLM and embedding providers:

ProviderDescriptionChat ModelsEmbedding Models
openaiOpenAI API (GPT models)GPT-4, GPT-3.5-turbotext-embedding-ada-002
aliyunAlibaba Cloud DashScope APIQwen series (turbo/plus/max)text-embedding-v1
deepseekDeepSeek APIDeepSeek-chat, DeepSeek-coderDeepSeek-embedding
tencentTencent Cloud APIHunyuan series (lite/standard)Hunyuan-embedding
arkByteDance Ark APIDoubao series (lite/pro)Doubao-embedding
vllmLocal deployment with vLLMLlama, Vicuna, ChatGLMVarious open-source models

Field Definitions

FieldTypeDescription
chat[].providerstringWhich backend to use ("openai", "vllm", "aliyun", "deepseek", "tencent", "ark")
chat[].config_namestringUnique key referenced by agents or prompts to select this model
chat[].model_namestringModel identifier or local path to load balance across providers
chat[].api_keystringAPI key for cloud-based providers (e.g., OpenAI, Aliyun, DeepSeek, Tencent, Ark)
chat[].client_argsobjectClient arguments (e.g., max_retries, base_url(only for vLLM)) used to customize API request behavior.
chat[].generate_argsobjectInference parameters (e.g., temperature) used to control generation behavior.
embedding[].providerstringEmbedding backend identifier (e.g., "openai")
embedding[].config_namestringUnique key referenced by the memory manager to select this embedding
embedding[].model_namestringEmbedding model identifier or local path
embedding[].client_argsobjectClient arguments (e.g., max_retries, base_url(only for vLLM)) used to customize API request behavior.

Configuration Examples

OpenAI-Only Configuration

With openAI, you can set your model configs like this to use the API

{
"chat": [
{
"provider": "openai",
"config_name": "openai-gpt4o", // you may choose any unique strings as identifier, and there's memory config in config.json refering it
"model_name": "gpt-4o", // chat model name, you can check the list on official documentation.
"api_key": "sk-xxx", // put your API key here.
"generate_args": {
"temperature": 0.7 // arguments of generating, you may check it on documentation of API provider.
}
}
],
"embedding": [
{
"provider": "openai",
"config_name": "openai-embedding",
"model_name": "text-embedding-3-small", // embedding model name, you can check the list on official documentation
}
]
}

Aliyun DashScope Configuration

{
"chat": [
{
"provider": "aliyun",
"config_name": "aliyun-qwen",
"model_name": "qwen-plus",
"api_key": "your-dashscope-api-key",
"generate_args": {
"temperature": 0.7
}
}
],
"embedding": [
{
"provider": "aliyun",
"config_name": "aliyun-embedding",
"model_name": "text-embedding-v1",
"api_key": "your-dashscope-api-key"
}
]
}

DeepSeek Configuration

{
"chat": [
{
"provider": "deepseek",
"config_name": "deepseek-chat",
"model_name": "deepseek-chat",
"api_key": "your-deepseek-api-key",
"generate_args": {
"temperature": 0.7
}
}
]
}

Multi-Provider Configuration

{
"chat": [
{
"provider": "openai",
"config_name": "openai-gpt4o",
"model_name": "gpt-4o",
"api_key": "sk-xxx"
},
{
"provider": "aliyun",
"config_name": "aliyun-qwen",
"model_name": "qwen-plus",
"api_key": "your-dashscope-api-key"
},
{
"provider": "vllm",
"config_name": "local-llama",
"model_name": "Llama-3-8B-Instruct",
"client_args": {
"base_url": "http://localhost:8000/v1/"
}
}
],
"embedding": [
{
"provider": "openai",
"config_name": "openai-embedding",
"model_name": "text-embedding-3-small",
"api_key": "sk-xxx"
}
]
}