feat: adapter chatglm 3
This commit is contained in:
parent
544e86fc7a
commit
4b36b4930e
|
|
@ -33,7 +33,7 @@ public class Chat
|
|||
public Chat(string apiKey, string basicAddress = "https://open.bigmodel.cn/api/paas/v4/")
|
||||
{
|
||||
this._apiKey = apiKey;
|
||||
this._baseAddress = basicAddress;
|
||||
this._baseAddress = basicAddress.TrimEnd('/');
|
||||
}
|
||||
|
||||
private async IAsyncEnumerable<string> CompletionBase(TextRequestBase textRequestBody,string apiKey)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public class Embeddings
|
|||
public Embeddings(string apiKey, string basicAddress = "https://open.bigmodel.cn/api/paas/v4/")
|
||||
{
|
||||
this._apiKey = apiKey;
|
||||
this._baseAddress = basicAddress;
|
||||
this._baseAddress = basicAddress.TrimEnd('/');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public class Images
|
|||
public Images(string apiKey, string basicAddress = "https://open.bigmodel.cn/api/paas/v4/")
|
||||
{
|
||||
this._apiKey = apiKey;
|
||||
this._baseAddress = basicAddress;
|
||||
this._baseAddress = basicAddress.TrimEnd('/');
|
||||
}
|
||||
|
||||
private IEnumerable<string> GenerateBase(ImageRequestBase requestBody)
|
||||
|
|
|
|||
|
|
@ -93,6 +93,17 @@
|
|||
"CompletionCost": 0.002
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Provider": "metaglm",
|
||||
"Models": [
|
||||
{
|
||||
"Name": "chatglm3_6b",
|
||||
"Type": "chat",
|
||||
"PromptCost": 0.0015,
|
||||
"CompletionCost": 0.002
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
|
|
@ -219,12 +230,19 @@
|
|||
"ApiSecret": "",
|
||||
"ModelVersion": "V3_5"
|
||||
},
|
||||
"MetaGLM": {
|
||||
"ApiKey": "6b6c8b3fca3e5da21d633e350980744d.938gruOqrK4BDqW8",
|
||||
"BaseAddress": "http://localhost:8100/v1/",
|
||||
"ModelId": "chatglm3_6b",
|
||||
"Temperature": 0.7,
|
||||
"TopP": 0.7
|
||||
},
|
||||
|
||||
"GoogleApi": {
|
||||
"ApiKey": "",
|
||||
"Map": {
|
||||
"Endpoint": "https://maps.googleapis.com/maps/api/geocode/json",
|
||||
"Components": "country=US|country=CA",
|
||||
"Components": "country=US|country=CA"
|
||||
},
|
||||
"Youtube": {
|
||||
"Endpoint": "https://www.googleapis.com/youtube/v3/search",
|
||||
|
|
@ -251,7 +269,8 @@
|
|||
"BotSharp.Plugin.PizzaBot",
|
||||
"BotSharp.Plugin.WebDriver",
|
||||
"BotSharp.Plugin.LLamaSharp",
|
||||
"BotSharp.Plugin.SparkDesk"
|
||||
"BotSharp.Plugin.SparkDesk",
|
||||
"BotSharp.Plugin.MetaGLM"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue