这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libs/superagent/app/api/workflow_configs/saml_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class LLMAgentTool(BaseAgentToolModel, LLMAgent):
LLMProvider.TOGETHER_AI.value,
LLMProvider.ANTHROPIC.value,
LLMProvider.BEDROCK.value,
LLMProvider.MISTRAL.value,
]


Expand All @@ -159,6 +160,7 @@ class Workflow(BaseModel):
perplexity: Optional[LLMAgent]
together_ai: Optional[LLMAgent]
bedrock: Optional[LLMAgent]
mistral: Optional[LLMAgent]
anthropic: Optional[LLMAgent]
llm: Optional[LLMAgent] = Field(
description="Deprecated! Use LLM providers instead. e.g. `perplexity` or `together_ai`"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "LLMProvider" ADD VALUE 'MISTRAL';
1 change: 1 addition & 0 deletions libs/superagent/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ enum LLMProvider {
TOGETHER_AI
ANTHROPIC
BEDROCK
MISTRAL
}

enum LLMModel {
Expand Down
8 changes: 8 additions & 0 deletions libs/ui/app/integrations/llm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ const antrophicSchema = z.object({
apiKey: z.string().nonempty("API key is required"),
options: z.object({}),
})

const mistralSchema = z.object({
llmType: z.literal(LLMProvider.MISTRAL),
apiKey: z.string().nonempty("API key is required"),
options: z.object({}),
})

const amazonBedrockSchema = z.object({
llmType: z.literal(LLMProvider.BEDROCK),
apiKey: z.literal(""),
Expand All @@ -79,6 +86,7 @@ const formSchema = z.discriminatedUnion("llmType", [
perplexityAiSchema,
togetherAiSchema,
antrophicSchema,
mistralSchema,
amazonBedrockSchema,
azureOpenAiSchema,
])
Expand Down
13 changes: 13 additions & 0 deletions libs/ui/config/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,19 @@ export const siteConfig = {
},
],
},
{
disabled: false,
formDescription: "Please enter your Mistral API key.",
provider: LLMProvider.MISTRAL,
name: "Mistral",
metadata: [
{
key: "apiKey",
type: "input",
label: "Mistral API Key",
},
],
},
{
disabled: false,
formDescription: "Please enter your Azure OpenAI API key.",
Expand Down
1 change: 1 addition & 0 deletions libs/ui/models/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const LLMProvider = {
TOGETHER_AI: "TOGETHER_AI",
ANTHROPIC: "ANTHROPIC",
BEDROCK: "BEDROCK",
MISTRAL: "MISTRAL",
AZURE_OPENAI: "AZURE_OPENAI",
} as const

Expand Down