@@ -107,12 +107,16 @@ export const createSpeechOpenAI = async (
|
||||
mimeType: 'audio/mpeg',
|
||||
})
|
||||
|
||||
newSessionState = updateVariablesInSession(newSessionState)([
|
||||
{
|
||||
...saveUrlInVariable,
|
||||
value: url,
|
||||
},
|
||||
])
|
||||
newSessionState = updateVariablesInSession({
|
||||
newVariables: [
|
||||
{
|
||||
...saveUrlInVariable,
|
||||
value: url,
|
||||
},
|
||||
],
|
||||
state: newSessionState,
|
||||
currentBlockId: undefined,
|
||||
}).updatedState
|
||||
|
||||
return {
|
||||
startTimeShouldBeUpdated: true,
|
||||
|
||||
@@ -22,7 +22,6 @@ import {
|
||||
defaultOpenAIOptions,
|
||||
} from '@typebot.io/schemas/features/blocks/integrations/openai/constants'
|
||||
import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants'
|
||||
import { isPlaneteScale } from '@typebot.io/lib/isPlanetScale'
|
||||
|
||||
export const createChatCompletionOpenAI = async (
|
||||
state: SessionState,
|
||||
@@ -68,9 +67,11 @@ export const createChatCompletionOpenAI = async (
|
||||
typebot.variables
|
||||
)(options.messages)
|
||||
if (variablesTransformedToList.length > 0)
|
||||
newSessionState = updateVariablesInSession(state)(
|
||||
variablesTransformedToList
|
||||
)
|
||||
newSessionState = updateVariablesInSession({
|
||||
state,
|
||||
newVariables: variablesTransformedToList,
|
||||
currentBlockId: undefined,
|
||||
}).updatedState
|
||||
|
||||
const temperature = parseVariableNumber(typebot.variables)(
|
||||
options.advancedSettings?.temperature
|
||||
|
||||
@@ -42,7 +42,11 @@ export const resumeChatCompletion =
|
||||
return newVariables
|
||||
}, [])
|
||||
if (newVariables && newVariables.length > 0)
|
||||
newSessionState = updateVariablesInSession(newSessionState)(newVariables)
|
||||
newSessionState = updateVariablesInSession({
|
||||
newVariables,
|
||||
state: newSessionState,
|
||||
currentBlockId: undefined,
|
||||
}).updatedState
|
||||
return {
|
||||
outgoingEdgeId,
|
||||
newSessionState,
|
||||
|
||||
Reference in New Issue
Block a user