ADP-Chat-Client

Multi-Vendors

This document explains how to configure different AI vendors in the ADP Chat Client.

📋 Configuration Location

All vendor configurations must be added to the APP_CONFIGS field in your .env file.

The APP_CONFIGS field contains a JSON array of vendor configurations:

# In server/.env file
APP_CONFIGS='[
    {
        "Vendor": "Tencent",
        "ApplicationId": "your-app-id",
        "Comment": "Health Assistant",
        "AppKey": "your-app-key",
        "International": false
    },
    {
        "Vendor": "Ollama",
        "ApplicationId": "ollama-gemma3-1b",
        "DisplayName": "Gemma 3 Local Model",
        "BaseUrl": "http://localhost:11434/v1",
        "ModelName": "gemma3:1b",
        "Temperature": 0.7,
        "MaxTokens": 2000
    },
    {
        "Vendor": "OpenAI", 
        "ApplicationId": "openai-gpt4",
        "DisplayName": "ChatGPT 4",
        "ApiKey": "sk-proj-...",
        "BaseUrl": "https://api.openai.com/v1",
        "ModelName": "gpt-4"
    }
]'

Supported Vendors

VendorDescriptionUse Case
TencentTencent Cloud ADPEnterprise agent developing platform
OllamaLocal LLM modelsPrivacy-focused, offline AI (Llama, Gemma, Mistral)
OpenAIOpenAI GPT modelsState-of-the-art language models

1. Tencent ADP

Use Case: Enterprise AI with knowledge base and RAG support

Configuration

{
    "Vendor": "Tencent",
    "ApplicationId": "1979154564259682304",
    "Comment": "Health Assistant",
    "AppKey": "your-app-key-here",
    "International": false
}

Required Fields

FieldDescriptionHow to Obtain
ApplicationIdTencent ADP application IDADP Console
AppKeyApplication authentication keyADP Console → App Settings
InternationalRegion settingfalse (China) / true (International)

Additional Setup

Configure Tencent Cloud credentials in .env:

TC_SECRET_APPID=your-appid
TC_SECRET_ID=your-secret-id
TC_SECRET_KEY=your-secret-key

Get credentials from:


2. Ollama

Use Case: Local, privacy-focused AI models (Llama, Gemma, Mistral)

Quick Start

# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# Pull a model
ollama pull gemma3:1b

# Start service
ollama serve

Configuration

{
    "Vendor": "Ollama",
    "ApplicationId": "ollama-gemma3-1b",
    "DisplayName": "Gemma 3 Local Model",
    "BaseUrl": "http://localhost:11434/v1",
    "ModelName": "gemma3:1b",
    "Temperature": 0.7,
    "MaxTokens": 2000
}

Required Fields

FieldDescriptionDefault
BaseUrlOllama API endpoint (must end with /v1)http://localhost:11434/v1
ModelNameModel identifierllama2

Optional Parameters

FieldDescriptionDefaultRange
TemperatureRandomness/creativity0.70.0 - 2.0
MaxTokensMax response length20001 - 8192
TopPNucleus sampling1.00.1 - 1.0
FrequencyPenaltyReduce repetition0.0-2.0 - 2.0
PresencePenaltyEncourage new topics0.0-2.0 - 2.0
ollama pull llama2          # Llama 2 7B
ollama pull llama3.1:8b     # Llama 3.1 8B
ollama pull mistral:7b      # Mistral 7B
ollama pull gemma3:1b       # Gemma 1B

3. OpenAI

Use Case: State-of-the-art language models (GPT-3.5, GPT-4, GPT-5)

Configuration

{
    "Vendor": "OpenAI",
    "ApplicationId": "openai-gpt4",
    "DisplayName": "ChatGPT 4",
    "ApiKey": "sk-proj-...",
    "BaseUrl": "https://api.openai.com/v1",
    "ModelName": "gpt-4"
}

Required Fields

FieldDescriptionExample
ApiKeyOpenAI API keysk-proj-...
BaseUrlAPI endpointhttps://api.openai.com/v1
ModelNameModel identifiergpt-4, gpt-3.5-turbo

Supported Models

ModelUse Case
gpt-3.5-turboFast, cost-effective
gpt-4Complex reasoning, coding
gpt-4-turboBalanced performance
gpt-4.1Latest GPT-4 variant
gpt-5Advanced reasoning (no custom temperature)

Special Note: GPT-5/o1/o3

These models don't support custom Temperature:

{
    "Vendor": "OpenAI",
    "ApplicationId": "openai-gpt5",
    "DisplayName": "GPT-5",
    "ApiKey": "sk-proj-...",
    "ModelName": "gpt-5"
    // Do NOT set Temperature
}

Configuration Examples

Single Vendor

APP_CONFIGS='[
    {
        "Vendor": "Ollama",
        "ApplicationId": "ollama-llama2",
        "DisplayName": "Llama 2",
        "BaseUrl": "http://localhost:11434/v1",
        "ModelName": "llama2"
    }
]'

Multiple Vendors

APP_CONFIGS='[
    {
        "Vendor": "Tencent",
        "ApplicationId": "1234567890",
        "Comment": "Health Assistant",
        "AppKey": "...",
        "International": false
    },
    {
        "Vendor": "Ollama",
        "ApplicationId": "ollama-gemma3",
        "DisplayName": "Gemma 3 Local",
        "BaseUrl": "http://localhost:11434/v1",
        "ModelName": "gemma3:1b"
    },
    {
        "Vendor": "OpenAI",
        "ApplicationId": "openai-gpt4",
        "DisplayName": "ChatGPT 4",
        "ApiKey": "sk-proj-...",
        "ModelName": "gpt-4"
    }
]'

Common Issues

Vendor not found

Check Vendor field is capitalized: "Tencent", "Ollama", "OpenAI"

Ollama connection failed

ollama serve  # Start Ollama service
curl http://localhost:11434/v1/models  # Test API

OpenAI API error 401

OpenAI temperature error

Remove Temperature field for GPT-5/o1/o3 models


Resources