mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
feat(server): refactor provider interface (#11665)
fix AI-4 fix AI-18 better provider/model choose to allow fallback to similar models (e.g., self-hosted) when the provider is not fully configured split functions of different output types
This commit is contained in:
@@ -15,7 +15,6 @@ export type Prompt = {
|
||||
action: string | null;
|
||||
config: {
|
||||
__typename?: 'CopilotPromptConfigType';
|
||||
jsonMode: boolean | null;
|
||||
frequencyPenalty: number | null;
|
||||
presencePenalty: number | null;
|
||||
temperature: number | null;
|
||||
|
||||
@@ -8493,6 +8493,13 @@ export function useAFFiNEI18N(): {
|
||||
* `Copilot prompt is invalid.`
|
||||
*/
|
||||
["error.COPILOT_PROMPT_INVALID"](): string;
|
||||
/**
|
||||
* `Copilot provider {{provider}} does not support output type {{kind}}`
|
||||
*/
|
||||
["error.COPILOT_PROVIDER_NOT_SUPPORTED"](options: Readonly<{
|
||||
provider: string;
|
||||
kind: string;
|
||||
}>): string;
|
||||
/**
|
||||
* `Provider {{provider}} failed with {{kind}} error: {{message}}`
|
||||
*/
|
||||
|
||||
@@ -2105,6 +2105,7 @@
|
||||
"error.COPILOT_MESSAGE_NOT_FOUND": "Copilot message {{messageId}} not found.",
|
||||
"error.COPILOT_PROMPT_NOT_FOUND": "Copilot prompt {{name}} not found.",
|
||||
"error.COPILOT_PROMPT_INVALID": "Copilot prompt is invalid.",
|
||||
"error.COPILOT_PROVIDER_NOT_SUPPORTED": "Copilot provider {{provider}} does not support output type {{kind}}",
|
||||
"error.COPILOT_PROVIDER_SIDE_ERROR": "Provider {{provider}} failed with {{kind}} error: {{message}}",
|
||||
"error.COPILOT_INVALID_CONTEXT": "Invalid copilot context {{contextId}}.",
|
||||
"error.COPILOT_CONTEXT_FILE_NOT_SUPPORTED": "File {{fileName}} is not supported to use as context: {{message}}",
|
||||
|
||||
Reference in New Issue
Block a user