♻️ (mistral) Use new ai sdk Mistral core
This commit is contained in:
@ -67,6 +67,8 @@ export const askAssistant = createAction({
|
||||
{
|
||||
id: 'fetchAssistants',
|
||||
fetch: async ({ options, credentials }) => {
|
||||
if (!credentials?.apiKey) return []
|
||||
|
||||
const config = {
|
||||
apiKey: credentials.apiKey,
|
||||
baseURL: options.baseUrl,
|
||||
@ -100,7 +102,8 @@ export const askAssistant = createAction({
|
||||
{
|
||||
id: 'fetchAssistantFunctions',
|
||||
fetch: async ({ options, credentials }) => {
|
||||
if (!options.assistantId) return []
|
||||
if (!options.assistantId || !credentials?.apiKey) return []
|
||||
|
||||
const config = {
|
||||
apiKey: credentials.apiKey,
|
||||
baseURL: options.baseUrl,
|
||||
|
@ -46,6 +46,8 @@ export const createChatCompletion = createAction({
|
||||
id: 'fetchModels',
|
||||
dependencies: ['baseUrl', 'apiVersion'],
|
||||
fetch: async ({ credentials, options }) => {
|
||||
if (!credentials?.apiKey) return []
|
||||
|
||||
const baseUrl = options?.baseUrl ?? defaultOpenAIOptions.baseUrl
|
||||
const config = {
|
||||
apiKey: credentials.apiKey,
|
||||
|
@ -37,6 +37,8 @@ export const createSpeech = createAction({
|
||||
id: 'fetchSpeechModels',
|
||||
dependencies: ['baseUrl', 'apiVersion'],
|
||||
fetch: async ({ credentials, options }) => {
|
||||
if (!credentials?.apiKey) return []
|
||||
|
||||
const baseUrl = options?.baseUrl ?? defaultOpenAIOptions.baseUrl
|
||||
const config = {
|
||||
apiKey: credentials.apiKey,
|
||||
|
@ -7,8 +7,8 @@
|
||||
"author": "Baptiste Arnaud",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"ai": "3.0.31",
|
||||
"openai": "4.38.3"
|
||||
"ai": "3.1.12",
|
||||
"openai": "4.47.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typebot.io/forge": "workspace:*",
|
||||
|
Reference in New Issue
Block a user