Feat/chat support voice input (#532)

This commit is contained in:
zxhlyh
2023-07-07 17:50:42 +08:00
committed by GitHub
parent feebb5dd1f
commit a03a92e9db
70 changed files with 1420 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
import { createContext } from 'use-context-selector'
import type { CompletionParams, Inputs, ModelConfig, MoreLikeThisConfig, PromptConfig, SuggestedQuestionsAfterAnswerConfig } from '@/models/debug'
import type { CompletionParams, Inputs, ModelConfig, MoreLikeThisConfig, PromptConfig, SpeechToTextConfig, SuggestedQuestionsAfterAnswerConfig } from '@/models/debug'
import type { DataSet } from '@/models/datasets'
type IDebugConfiguration = {
@@ -19,6 +19,8 @@ type IDebugConfiguration = {
setMoreLikeThisConfig: (moreLikeThisConfig: MoreLikeThisConfig) => void
suggestedQuestionsAfterAnswerConfig: SuggestedQuestionsAfterAnswerConfig
setSuggestedQuestionsAfterAnswerConfig: (suggestedQuestionsAfterAnswerConfig: SuggestedQuestionsAfterAnswerConfig) => void
speechToTextConfig: SpeechToTextConfig
setSpeechToTextConfig: (speechToTextConfig: SpeechToTextConfig) => void
formattingChanged: boolean
setFormattingChanged: (formattingChanged: boolean) => void
inputs: Inputs
@@ -59,6 +61,10 @@ const DebugConfigurationContext = createContext<IDebugConfiguration>({
enabled: false,
},
setSuggestedQuestionsAfterAnswerConfig: () => { },
speechToTextConfig: {
enabled: false,
},
setSpeechToTextConfig: () => { },
formattingChanged: false,
setFormattingChanged: () => { },
inputs: {},