mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-01-18 09:12:52 +00:00
fix lint type error
This commit is contained in:
parent
653744c98a
commit
0c9589f380
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "obsidian-infio-copilot",
|
"name": "obsidian-infio-copilot",
|
||||||
"version": "0.0.3",
|
"version": "0.0.4",
|
||||||
"description": "A Cursor-inspired AI assistant for Obsidian that offers smart autocomplete and interactive chat with your selected notes",
|
"description": "A Cursor-inspired AI assistant that offers smart autocomplete and interactive chat with your selected notes",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bundle-pglite": "node scripts/bundle-pglite-resources.mjs",
|
"bundle-pglite": "node scripts/bundle-pglite-resources.mjs",
|
||||||
|
|||||||
@ -158,6 +158,7 @@ export class GroqProvider implements BaseLLMProvider {
|
|||||||
finish_reason: choice.finish_reason,
|
finish_reason: choice.finish_reason,
|
||||||
message: {
|
message: {
|
||||||
content: choice.message.content,
|
content: choice.message.content,
|
||||||
|
reasoning_content: 'reasoning_content' in choice.message ? (choice.message.reasoning_content as string) : null,
|
||||||
role: choice.message.role,
|
role: choice.message.role,
|
||||||
},
|
},
|
||||||
})),
|
})),
|
||||||
@ -177,6 +178,7 @@ export class GroqProvider implements BaseLLMProvider {
|
|||||||
finish_reason: choice.finish_reason ?? null,
|
finish_reason: choice.finish_reason ?? null,
|
||||||
delta: {
|
delta: {
|
||||||
content: choice.delta.content ?? null,
|
content: choice.delta.content ?? null,
|
||||||
|
reasoning_content: 'reasoning_content' in choice.delta ? (choice.delta.reasoning_content as string) : null,
|
||||||
role: choice.delta.role,
|
role: choice.delta.role,
|
||||||
},
|
},
|
||||||
})),
|
})),
|
||||||
|
|||||||
@ -121,8 +121,8 @@ export class OpenAIMessageAdapter {
|
|||||||
choices: response.choices.map((choice) => ({
|
choices: response.choices.map((choice) => ({
|
||||||
finish_reason: choice.finish_reason,
|
finish_reason: choice.finish_reason,
|
||||||
message: {
|
message: {
|
||||||
content: choice.message.content,
|
content: choice.message.content,
|
||||||
reasoning_content: choice.message.reasoning_content,
|
reasoning_content: 'reasoning_content' in choice.message ? (choice.message.reasoning_content as string) : null,
|
||||||
role: choice.message.role,
|
role: choice.message.role,
|
||||||
},
|
},
|
||||||
})),
|
})),
|
||||||
@ -143,7 +143,7 @@ export class OpenAIMessageAdapter {
|
|||||||
finish_reason: choice.finish_reason ?? null,
|
finish_reason: choice.finish_reason ?? null,
|
||||||
delta: {
|
delta: {
|
||||||
content: choice.delta.content ?? null,
|
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,
|
role: choice.delta.role,
|
||||||
},
|
},
|
||||||
})),
|
})),
|
||||||
|
|||||||
@ -248,7 +248,7 @@ export const ComboBoxComponent: React.FC<ComboBoxComponentProps> = ({
|
|||||||
<select
|
<select
|
||||||
className="infio-llm-setting-provider-switch"
|
className="infio-llm-setting-provider-switch"
|
||||||
value={modelProvider}
|
value={modelProvider}
|
||||||
onChange={(e) => setModelProvider(e.target.value)}
|
onChange={(e) => setModelProvider(e.target.value as ApiProvider)}
|
||||||
>
|
>
|
||||||
{providers.map((provider) => (
|
{providers.map((provider) => (
|
||||||
<option
|
<option
|
||||||
|
|||||||
@ -30,7 +30,8 @@ export type ResponseUsage = {
|
|||||||
type NonStreamingChoice = {
|
type NonStreamingChoice = {
|
||||||
finish_reason: string | null // Depends on the model. Ex: 'stop' | 'length' | 'content_filter' | 'tool_calls' | 'function_call'
|
finish_reason: string | null // Depends on the model. Ex: 'stop' | 'length' | 'content_filter' | 'tool_calls' | 'function_call'
|
||||||
message: {
|
message: {
|
||||||
content: string | null
|
content: string | null
|
||||||
|
reasoning_content?: string | null
|
||||||
role: string
|
role: string
|
||||||
}
|
}
|
||||||
error?: Error
|
error?: Error
|
||||||
@ -40,7 +41,7 @@ type StreamingChoice = {
|
|||||||
finish_reason: string | null
|
finish_reason: string | null
|
||||||
delta: {
|
delta: {
|
||||||
content: string | null
|
content: string | null
|
||||||
reasoning_content: string | null
|
reasoning_content?: string | null
|
||||||
role?: string
|
role?: string
|
||||||
}
|
}
|
||||||
error?: Error
|
error?: Error
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user