mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-12-05 15:41:56 +00:00
Compare commits
2 Commits
1e3efeda41
...
e2255e6901
| Author | SHA1 | Date | |
|---|---|---|---|
| e2255e6901 | |||
| 65c0a3fe2e |
@ -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