feat: add Together AI integration and provider implementation guide

- Create detailed provider implementation guide with:
  - Architecture overview and implementation steps
  - Configuration patterns and best practices
  - Testing checklist and Docker integration guide
  - Example using Together AI implementation
- Add Together AI as new provider with:
  - Environment variables and Docker configuration
  - Support for Qwen, Llama, and Mixtral models
  - API key and base URL management
  - OpenAI-compatible API integration
This commit is contained in:
Martin Ouimet
2024-11-23 00:20:35 -05:00
parent 7fc8e40c03
commit 76cc7a8139
7 changed files with 43 additions and 0 deletions

View File

@@ -35,6 +35,8 @@ export function getAPIKey(cloudflareEnv: Env, provider: string, userApiKeys?: Re
return env.MISTRAL_API_KEY || cloudflareEnv.MISTRAL_API_KEY;
case 'OpenAILike':
return env.OPENAI_LIKE_API_KEY || cloudflareEnv.OPENAI_LIKE_API_KEY;
case 'Together':
return env.TOGETHER_API_KEY || cloudflareEnv.TOGETHER_API_KEY;
case 'xAI':
return env.XAI_API_KEY || cloudflareEnv.XAI_API_KEY;
case 'Cohere':
@@ -48,6 +50,8 @@ export function getAPIKey(cloudflareEnv: Env, provider: string, userApiKeys?: Re
export function getBaseURL(cloudflareEnv: Env, provider: string) {
switch (provider) {
case 'Together':
return env.TOGETHER_API_BASE_URL || cloudflareEnv.TOGETHER_API_BASE_URL;
case 'OpenAILike':
return env.OPENAI_LIKE_API_BASE_URL || cloudflareEnv.OPENAI_LIKE_API_BASE_URL;
case 'LMStudio':