File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,15 @@ const { MODEL_MAP } = require("../modelMap");
99
1010class ZAiLLM {
1111 constructor ( embedder = null , modelPreference = null ) {
12- if ( ! process . env . ZAI_API_KEY )
13- throw new Error ( "No Z.AI API key was set." ) ;
12+ if ( ! process . env . ZAI_API_KEY ) throw new Error ( "No Z.AI API key was set." ) ;
1413 this . className = "ZAiLLM" ;
1514 const { OpenAI : OpenAIApi } = require ( "openai" ) ;
1615
1716 this . openai = new OpenAIApi ( {
1817 baseURL : "https://api.z.ai/api/paas/v4" ,
1918 apiKey : process . env . ZAI_API_KEY ,
2019 } ) ;
21- this . model =
22- modelPreference || process . env . ZAI_MODEL_PREF || "glm-4.5" ;
20+ this . model = modelPreference || process . env . ZAI_MODEL_PREF || "glm-4.5" ;
2321 this . limits = {
2422 history : this . promptWindowLimit ( ) * 0.15 ,
2523 system : this . promptWindowLimit ( ) * 0.15 ,
@@ -189,4 +187,3 @@ class ZAiLLM {
189187module . exports = {
190188 ZAiLLM,
191189} ;
192-
Original file line number Diff line number Diff line change @@ -86,4 +86,3 @@ class ZAIProvider extends InheritMultiple([Provider, UnTooled]) {
8686}
8787
8888module . exports = ZAIProvider ;
89-
You can’t perform that action at this time.
0 commit comments