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
1 change: 1 addition & 0 deletions locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
"InputText": "Text",
"InputAudio": "Audio",
"SearchGrounding": "Use Search Grounding",
"SearchGroundingDescription": "When using the multi-modal feature, the search function is automatically disabled.",
"UpdateRealtimeAPISettings": "Update Realtime API Settings",
"UpdateRealtimeAPISettingsInfo": "When updating the API key, Azure Endpoint, voice type, model, or system prompt, please press the update button to start a new WebSocket session.",
"AzureEndpoint": "Azure Endpoint",
Expand Down
1 change: 1 addition & 0 deletions locales/ja/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
"InputText": "テキスト",
"InputAudio": "音声",
"SearchGrounding": "検索機能を利用する",
"SearchGroundingDescription": "マルチモーダル機能利用時は、検索機能は自動的に無効になります。",
"UpdateRealtimeAPISettings": "リアルタイムAPI設定を更新",
"UpdateRealtimeAPISettingsInfo": "APIキー、Azure Endpoint、ボイスタイプ、モデル、システムプロンプトを更新した際は更新ボタンを押して、新しいWebSocketセッションを開始してください。",
"AzureEndpoint": "Azure Endpoint",
Expand Down
1 change: 1 addition & 0 deletions locales/ko/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
"InputText": "텍스트",
"InputAudio": "음성",
"SearchGrounding": "검색 기능을 사용하기",
"SearchGroundingDescription": "멀티모달 기능 사용 시, 검색 기능은 자동으로 비활성화됩니다.",
"UpdateRealtimeAPISettings": "리얼타임 API 설정 업데이트",
"UpdateRealtimeAPISettingsInfo": "API 키, Azure Endpoint, 보이스 타입, 모델, 시스템 프롬프트를 업데이트한 경우 업데이트 버튼을 눌러 새로운 WebSocket 세션을 시작하십시오.",
"AzureEndpoint": "Azure Endpoint",
Expand Down
1 change: 1 addition & 0 deletions locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
"InputText": "文字",
"InputAudio": "音訊",
"SearchGrounding": "使用搜索功能",
"SearchGroundingDescription": "多模態功能使用時,搜索功能會自動無效。",
"UpdateRealtimeAPISettings": "更新實時API設定",
"UpdateRealtimeAPISettingsInfo": "當更新 API 金鑰、Azure Endpoint、語音型別、模型或系統提示時,請按更新按鈕以開始新的 WebSocket 會話。",
"AzureEndpoint": "Azure Endpoint",
Expand Down
1 change: 1 addition & 0 deletions src/components/settings/modelProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ const ModelProvider = () => {
<div className="my-16 typography-20 font-bold">
{t('SearchGrounding')}
</div>
<div className="my-16">{t('SearchGroundingDescription')}</div>
<div className="my-8">
<TextButton
onClick={() => {
Expand Down
5 changes: 4 additions & 1 deletion src/pages/api/aiChat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ export default async function handler(req: NextRequest) {

const instance = aiServiceInstance()
const modifiedMessages: Message[] = modifyMessages(aiService, model, messages)
const isUseSearchGrounding = aiService === 'google' && useSearchGrounding
const isUseSearchGrounding =
aiService === 'google' &&
useSearchGrounding &&
modifiedMessages.every((msg) => typeof msg.content === 'string')
const options = isUseSearchGrounding ? { useSearchGrounding: true } : {}
console.log('options', options)

Expand Down
Loading