fix lint type error

This commit is contained in:
duanfuxiang
2025-02-18 13:04:37 +08:00
parent 653744c98a
commit 0c9589f380
5 changed files with 11 additions and 8 deletions

View File

@@ -158,6 +158,7 @@ export class GroqProvider implements BaseLLMProvider {
finish_reason: choice.finish_reason,
message: {
content: choice.message.content,
reasoning_content: 'reasoning_content' in choice.message ? (choice.message.reasoning_content as string) : null,
role: choice.message.role,
},
})),
@@ -177,6 +178,7 @@ export class GroqProvider implements BaseLLMProvider {
finish_reason: choice.finish_reason ?? null,
delta: {
content: choice.delta.content ?? null,
reasoning_content: 'reasoning_content' in choice.delta ? (choice.delta.reasoning_content as string) : null,
role: choice.delta.role,
},
})),

View File

@@ -121,8 +121,8 @@ export class OpenAIMessageAdapter {
choices: response.choices.map((choice) => ({
finish_reason: choice.finish_reason,
message: {
content: choice.message.content,
reasoning_content: choice.message.reasoning_content,
content: choice.message.content,
reasoning_content: 'reasoning_content' in choice.message ? (choice.message.reasoning_content as string) : null,
role: choice.message.role,
},
})),
@@ -143,7 +143,7 @@ export class OpenAIMessageAdapter {
finish_reason: choice.finish_reason ?? null,
delta: {
content: choice.delta.content ?? null,
reasoning_content: choice.delta.reasoning_content ?? null,
reasoning_content: 'reasoning_content' in choice.delta ? (choice.delta.reasoning_content as string) : null,
role: choice.delta.role,
},
})),