Skip to content

Commit 04d1b92

Browse files
HavenDVclaude
andcommitted
feat: Add CustomProviders for Novita AI, Qwen, and Lepton AI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a457fa8 commit 04d1b92

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

src/libs/tryAGI.OpenAI/CustomProviders.cs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,21 @@ public static class CustomProviders
111111
/// </summary>
112112
public const string MinimaxBaseUrl = "https://api.minimax.io/v1";
113113

114+
/// <summary>
115+
/// https://novita.ai/docs
116+
/// </summary>
117+
public const string NovitaAIBaseUrl = "https://api.novita.ai/v3/openai";
118+
119+
/// <summary>
120+
/// https://help.aliyun.com/zh/model-studio/
121+
/// </summary>
122+
public const string QwenBaseUrl = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1";
123+
124+
/// <summary>
125+
/// https://www.lepton.ai/docs
126+
/// </summary>
127+
public const string LeptonAIBaseUrl = "https://api.lepton.ai/v1";
128+
114129
/// <summary>
115130
/// Creates an API to use for GitHub Models: https://github.com/marketplace/models
116131
/// </summary>
@@ -308,4 +323,31 @@ public static OpenAiClient Minimax(string apiKey)
308323
{
309324
return new OpenAiClient(apiKey, baseUri: new Uri(MinimaxBaseUrl));
310325
}
326+
327+
/// <summary>
328+
/// Create an API to use for Novita AI.
329+
/// </summary>
330+
/// <returns></returns>
331+
public static OpenAiClient NovitaAI(string apiKey)
332+
{
333+
return new OpenAiClient(apiKey, baseUri: new Uri(NovitaAIBaseUrl));
334+
}
335+
336+
/// <summary>
337+
/// Create an API to use for Qwen (Alibaba).
338+
/// </summary>
339+
/// <returns></returns>
340+
public static OpenAiClient Qwen(string apiKey)
341+
{
342+
return new OpenAiClient(apiKey, baseUri: new Uri(QwenBaseUrl));
343+
}
344+
345+
/// <summary>
346+
/// Create an API to use for Lepton AI.
347+
/// </summary>
348+
/// <returns></returns>
349+
public static OpenAiClient LeptonAI(string apiKey)
350+
{
351+
return new OpenAiClient(apiKey, baseUri: new Uri(LeptonAIBaseUrl));
352+
}
311353
}

0 commit comments

Comments
 (0)