fix lint type error
This commit is contained in:
@@ -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,
|
||||
},
|
||||
})),
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
})),
|
||||
|
||||
@@ -248,7 +248,7 @@ export const ComboBoxComponent: React.FC<ComboBoxComponentProps> = ({
|
||||
<select
|
||||
className="infio-llm-setting-provider-switch"
|
||||
value={modelProvider}
|
||||
onChange={(e) => setModelProvider(e.target.value)}
|
||||
onChange={(e) => setModelProvider(e.target.value as ApiProvider)}
|
||||
>
|
||||
{providers.map((provider) => (
|
||||
<option
|
||||
|
||||
@@ -30,7 +30,8 @@ export type ResponseUsage = {
|
||||
type NonStreamingChoice = {
|
||||
finish_reason: string | null // Depends on the model. Ex: 'stop' | 'length' | 'content_filter' | 'tool_calls' | 'function_call'
|
||||
message: {
|
||||
content: string | null
|
||||
content: string | null
|
||||
reasoning_content?: string | null
|
||||
role: string
|
||||
}
|
||||
error?: Error
|
||||
@@ -40,7 +41,7 @@ type StreamingChoice = {
|
||||
finish_reason: string | null
|
||||
delta: {
|
||||
content: string | null
|
||||
reasoning_content: string | null
|
||||
reasoning_content?: string | null
|
||||
role?: string
|
||||
}
|
||||
error?: Error
|
||||
|
||||
Reference in New Issue
Block a user