mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-12-05 23:51:57 +00:00
Compare commits
No commits in common. "e2255e69013beeb486304a31c4dad94877918ea0" and "1e3efeda414d09d460d4b10fdc2d7153775aff3f" have entirely different histories.
e2255e6901
...
1e3efeda41
@ -43,10 +43,10 @@ class OpenaiChat {
|
|||||||
];
|
];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
logger.info("[DEBUG] 请求体:", {
|
//logger.info("[DEBUG] 请求体:", {
|
||||||
model: model,
|
//model: model,
|
||||||
messages,
|
//messages,
|
||||||
});
|
//});
|
||||||
|
|
||||||
const completion = await this.openai.chat.completions.create({
|
const completion = await this.openai.chat.completions.create({
|
||||||
messages: messages,
|
messages: messages,
|
||||||
@ -54,8 +54,8 @@ class OpenaiChat {
|
|||||||
temperature: temperature,
|
temperature: temperature,
|
||||||
frequency_penalty: 0.2,
|
frequency_penalty: 0.2,
|
||||||
presence_penalty: 0.2,
|
presence_penalty: 0.2,
|
||||||
response_format:{type: "json_object"},
|
response_format: { type: 'json_object' },
|
||||||
stream:false
|
stream: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const aiResponse = completion.choices[0].message.content;
|
const aiResponse = completion.choices[0].message.content;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user