MCPcopy Create free account
hub / github.com/Stevenic/codepilot / createModel

Method createModel

lib/Codepilot.js:157–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155 });
156 }
157 createModel() {
158 // Generate list of functions
159 const functions = [];
160 for (const entry of this._functions.values()) {
161 functions.push(entry.schema);
162 }
163 // Create an instance of a model
164 const modelOptions = {
165 apiKey: this._index.keys.apiKey,
166 completion_type: 'chat',
167 model: this._index.config.model,
168 temperature: this._index.config.temperature,
169 max_input_tokens: this._index.config.max_input_tokens,
170 max_tokens: this._index.config.max_tokens,
171 //logRequests: true
172 };
173 if (functions.length > 0) {
174 modelOptions.functions = functions;
175 }
176 return new alphawave_1.OpenAIModel(modelOptions);
177 }
178}
179exports.Codepilot = Codepilot;
180//# sourceMappingURL=Codepilot.js.map

Callers 1

chatMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected