@saltcorn/large-language-model 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generate.js +2 -1
- package/package.json +1 -1
package/generate.js
CHANGED
|
@@ -109,7 +109,7 @@ const getCompletionOpenAICompatible = async (
|
|
|
109
109
|
if (bearer) headers.Authorization = "Bearer " + bearer;
|
|
110
110
|
const body = {
|
|
111
111
|
//prompt: "How are you?",
|
|
112
|
-
model,
|
|
112
|
+
model: rest.model || model,
|
|
113
113
|
messages: [
|
|
114
114
|
{
|
|
115
115
|
role: "system",
|
|
@@ -121,6 +121,7 @@ const getCompletionOpenAICompatible = async (
|
|
|
121
121
|
temperature: temperature || 0.7,
|
|
122
122
|
...rest,
|
|
123
123
|
};
|
|
124
|
+
if (debugResult) console.log("OpenAI request", JSON.stringify(body, null, 2));
|
|
124
125
|
const rawResponse = await fetch(chatCompleteEndpoint, {
|
|
125
126
|
method: "POST",
|
|
126
127
|
headers,
|