Skip to content

Commit

Permalink
Merge pull request #150 from tegnike/feature/add-vercel-ai-sdk
Browse files Browse the repository at this point in the history
Vercel AI SDKを導入して各AIサービスの呼び出し処理を統一化
  • Loading branch information
tegnike authored Aug 31, 2024
2 parents 5b1f101 + a7b1806 commit 93cbf9d
Show file tree
Hide file tree
Showing 33 changed files with 2,671 additions and 1,257 deletions.
15 changes: 10 additions & 5 deletions locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"YoutubeAPIKey": "YouTube API Key",
"YoutubeLiveID": "YouTube Live ID",
"ConversationContinuityMode": "Conversation Continuity Mode (Beta)",
"ConversationContinuityModeInfo": "When there is no comment, AI tries to continue the conversation. Currently only OpenAI or Anthropic is supported.",
"ConversationContinuityModeInfo": "When there is no comment, AI tries to continue the conversation. Currently only OpenAI, Anthropic Claude, Google Gemini are supported.",
"ConversationContinuityModeInfo2": "One answer calls LLM multiple times, so API usage may increase. Please be aware of this.",
"ConversationContinuityModeInfo3": "gpt-4o, gpt-4-turbo, claude-3-opus, claude-3.5-sonnet work relatively stably.",
"StatusOn": "Status: ON",
Expand All @@ -24,14 +24,19 @@
"OpenAIAPIKeyLabel": "OpenAI API Key",
"AnthropicAPIKeyLabel": "Anthropic API Key",
"GoogleAPIKeyLabel": "Google Gemini API Key",
"AzureAPIKeyLabel": "Azure OpenAI API Key",
"AzureAPIURL": "Azure OpenAI API URL",
"GroqAPIKeyLabel": "Groq API Key",
"CohereAPIKeyLabel": "Cohere API Key",
"MistralAIAPIKeyLabel": "MistralAI API Key",
"PerplexityAPIKeyLabel": "Perplexity API Key",
"FireworksAPIKeyLabel": "Fireworks API Key",
"DifyAPIKeyLabel": "Dify API Key",
"APIKeyInstruction": "You can obtain the API key below. Enter the obtained API key into the form.",
"ChatGPTInfo": "ChatGPT API is accessed directly from the browser.",
"LocalLLMInfo": "Local LLM server must be running. Setup is as follows.",
"LocalLLMInfo2": "Please enter the URL of the local LLM server (including port number) and the model name.",
"GroqInfo": "Groq API is accessed directly from the browser.",
"DifyInfo": "Dify only supports chatbot type.",
"DifyInfo": "Dify only supports chatbot and agent type.",
"DifyInfo2": "The length of the conversation history is dependent on the specifications of Dify.",
"DifyInfo3": "Example: http://localhost:80/v1/chat-messages",
"DifyInstruction": "If you are using Dify, the system prompt will not be used. Please set Dify chatbot.",
Expand Down Expand Up @@ -107,9 +112,9 @@
"ShowControlPanelInfo": "The settings screen can be displayed by pressing Cmd + . (Mac) / Ctrl + . (Windows) .",
"SlideMode": "Slide Mode",
"SelectedSlideDocs": "Selected Slide Documents",
"SlideModeDescription": "This is a mode where AI automatically presents slides. It is only available when the selected AI service is OpenAI, Anthropic, or Google Gemini.",
"SlideModeDescription": "This is a mode where AI automatically presents slides. It is only available when the selected AI service is OpenAI, Anthropic Claude, or Google Gemini.",
"PdfConvertLabel": "PDF Slide Conversion",
"PdfConvertDescription": "Convert PDF to slide mode data. Available only when the selected AI service is OpenAI.",
"PdfConvertDescription": "Convert PDF to slide mode data. Available only when the selected AI service is OpenAI, Anthropic Claude, or Google Gemini.",
"PdfConvertFileUpload": "Select PDF file",
"PdfConvertFolderName": "Save folder name",
"PdfConvertModelSelect": "Select model",
Expand Down
15 changes: 10 additions & 5 deletions locales/ja/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"YoutubeAPIKey": "YouTube API キー",
"YoutubeLiveID": "YouTube Live ID",
"ConversationContinuityMode": "会話継続モード(ベータ版)",
"ConversationContinuityModeInfo": "コメントが無いときにAIが自ら会話を継続しようとするモードです。現在OpenAI または Anthropicのみ対応しています",
"ConversationContinuityModeInfo": "コメントが無いときにAIが自ら会話を継続しようとするモードです。現在OpenAI, Anthropic Claude, Google Geminiのみ対応しています",
"ConversationContinuityModeInfo2": "一度の回答で複数回LLMを呼び出すため、API利用料が増える可能性があります。ご注意ください。",
"ConversationContinuityModeInfo3": "gpt-4o, gpt-4-turbo, claude-3-opus, claude-3.5-sonnetで比較的安定動作します。",
"StatusOn": "状態:ON",
Expand All @@ -24,14 +24,19 @@
"OpenAIAPIKeyLabel": "OpenAI API キー",
"AnthropicAPIKeyLabel": "Anthropic API キー",
"GoogleAPIKeyLabel": "Google Gemini API キー",
"AzureAPIKeyLabel": "Azure OpenAI API キー",
"AzureAPIURL": "Azure OpenAI API URL",
"GroqAPIKeyLabel": "Groq API キー",
"CohereAPIKeyLabel": "Cohere API キー",
"MistralAIAPIKeyLabel": "MistralAI API キー",
"PerplexityAPIKeyLabel": "Perplexity API キー",
"FireworksAPIKeyLabel": "Fireworks API キー",
"DifyAPIKeyLabel": "Dify API キー",
"APIKeyInstruction": "APIキーは下記のリンクから取得できます。取得したAPIキーをフォームに入力してください。",
"ChatGPTInfo": "ChatGPT APIはブラウザから直接アクセスしています。",
"LocalLLMInfo": "ローカルLLM サーバーを起動している必要があります。",
"LocalLLMInfo2": "ローカルLLMのURL(ポート番号込み)とモデル名を入力してください。",
"GroqInfo": "Groq APIはブラウザから直接アクセスしています。",
"DifyInfo": "Difyでは、チャットボットタイプのみ対応しています",
"DifyInfo": "Difyでは、チャットボット または エージェントタイプのみ対応しています",
"DifyInfo2": "会話履歴の長さはDifyチャットボットの設定に依存します。",
"DifyInfo3": "例:http://localhost:80/v1/chat-messages",
"DifyInstruction": "Difyを使用している場合、このシステムプロンプトは使用されません。Difyチャットボットに設定してください。",
Expand Down Expand Up @@ -108,9 +113,9 @@
"ShowControlPanelInfo": "設定画面は Cmd + . (Mac) / Ctrl + . (Windows) で表示することができます。",
"SlideMode": "スライドモード",
"SelectedSlideDocs": "使用するスライド",
"SlideModeDescription": "AIが自動でスライドを発表するモードです。選択しているAIサービスがOpenAIまたはAnthropicまたはGoogle Geminiの場合のみ有効です。",
"SlideModeDescription": "AIが自動でスライドを発表するモードです。選択しているAIサービスがOpenAI, Anthropic Claude, Google Geminiの場合のみ有効です。",
"PdfConvertLabel": "PDFスライド変換",
"PdfConvertDescription": "PDFをスライドモード用のデータに変換します。選択しているAIサービスがOpenAIの場合のみ利用可能です",
"PdfConvertDescription": "PDFをスライドモード用のデータに変換します。選択しているAIサービスがOpenAI, Anthropic Claude, Google Geminiの場合のみ利用可能です",
"PdfConvertFileUpload": "PDFファイルを選択",
"PdfConvertFolderName": "保存フォルダ名",
"PdfConvertModelSelect": "モデルを選択",
Expand Down
15 changes: 10 additions & 5 deletions locales/ko/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"YoutubeAPIKey": "YouTube API 키",
"YoutubeLiveID": "YouTube Live ID",
"ConversationContinuityMode": "대화 지속 모드 (베타 버전)",
"ConversationContinuityModeInfo": "댓글이 없을 때 AI가 스스로 대화를 지속하려고 하는 모드입니다. 현재 OpenAI 또는 Anthropic만 지원됩니다.",
"ConversationContinuityModeInfo": "댓글이 없을 때 AI가 스스로 대화를 지속하려고 하는 모드입니다. 현재 OpenAI, Anthropic Claude, Google Gemini만 지원됩니다.",
"ConversationContinuityModeInfo2": "한 번의 응답에 여러 번 LLM을 호출하기 때문에 API 사용료가 증가할 수 있습니다. 주의하십시오.",
"ConversationContinuityModeInfo3": "gpt-4o, gpt-4-turbo, claude-3-opus, claude-3.5-sonnet에서 비교적 안정적으로 동작합니다.",
"StatusOn": "상태: ON",
Expand All @@ -24,14 +24,19 @@
"OpenAIAPIKeyLabel": "OpenAI API 키",
"AnthropicAPIKeyLabel": "Anthropic API 키",
"GoogleAPIKeyLabel": "Google Gemini API 키",
"AzureAPIKeyLabel": "Azure OpenAI API 키",
"AzureAPIURL": "Azure OpenAI API URL",
"GroqAPIKeyLabel": "Groq API 키",
"CohereAPIKeyLabel": "Cohere API 키",
"MistralAIAPIKeyLabel": "MistralAI API 키",
"PerplexityAPIKeyLabel": "Perplexity API 키",
"FireworksAPIKeyLabel": "Fireworks API 키",
"DifyAPIKeyLabel": "Dify API 키",
"APIKeyInstruction": "API 키는 아래 링크에서 얻을 수 있습니다. 얻은 API 키를 폼에 입력하십시오.",
"ChatGPTInfo": "ChatGPT API는 브라우저에서 직접 접근하고 있습니다.",
"LocalLLMInfo": "로컬 LLM 서버를 실행해야 합니다.",
"LocalLLMInfo2": "로컬 LLM의 URL(포트 번호 포함)과 모델 이름을 입력하십시오.",
"GroqInfo": "Groq API는 브라우저에서 직접 접근하고 있습니다.",
"DifyInfo": "Dify에서는 채팅 타입만 지원됩니다.",
"DifyInfo": "Dify에서는 채팅 봇과 에이전트 타입만 지원됩니다.",
"DifyInfo2": "대화 기록의 길이는 Dify 채팅봇 설정에 따라 달라집니다.",
"DifyInfo3": "예: http://localhost:80/v1/chat-messages",
"DifyInstruction": "Dify를 사용하는 경우, 이 시스템 프롬프트는 사용되지 않습니다. Dify 채팅 봇에 설정하십시오.",
Expand Down Expand Up @@ -107,9 +112,9 @@
"ShowControlPanelInfo": "설정 화면은 Cmd + . (Mac) / Ctrl + . (Windows)를 눌러 표시할 수 있습니다.",
"SlideMode": "슬라이드 모드",
"SelectedSlideDocs": "사용할 슬라이드",
"SlideModeDescription": "AI가 자동으로 슬라이드를 발표하는 모드입니다. 선택한 AI 서비스가 OpenAI, Anthropic 또는 Google Gemini인 경우에만 사용 가능합니다.",
"SlideModeDescription": "AI가 자동으로 슬라이드를 발표하는 모드입니다. 선택한 AI 서비스가 OpenAI, Anthropic Claude, Google Gemini인 경우에만 사용 가능합니다.",
"PdfConvertLabel": "PDF 슬라이드 변환",
"PdfConvertDescription": "PDF를 슬라이드 모드 데이터로 변환합니다. 선택한 AI 서비스가 OpenAI인 경우에만 사용 가능합니다.",
"PdfConvertDescription": "PDF를 슬라이드 모드 데이터로 변환합니다. 선택한 AI 서비스가 OpenAI, Anthropic Claude, Google Gemini인 경우에만 사용 가능합니다.",
"PdfConvertFileUpload": "PDF 파일 선택",
"PdfConvertFolderName": "저장 폴더 이름",
"PdfConvertModelSelect": "모델 선택",
Expand Down
15 changes: 10 additions & 5 deletions locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
"YoutubeMode": "YouTube 模式",
"YoutubeInfo": "YouTube 直播 ID 是直播 ID 而不是頻道 ID",
"YoutubeAPIKey": "YouTube API 金鑰",
"CohereAPIKeyLabel": "Cohere API 金鑰",
"MistralAIAPIKeyLabel": "MistralAI API 金鑰",
"PerplexityAPIKeyLabel": "Perplexity API 金鑰",
"FireworksAPIKeyLabel": "Fireworks API 金鑰",
"YoutubeLiveID": "YouTube 直播 ID",
"ConversationContinuityMode": "會話持續模式(測試版)",
"ConversationContinuityModeInfo": "這是一個在沒有評論時,AI會自行嘗試繼續會話的模式。目前僅支援 OpenAIAnthropic。",
"ConversationContinuityModeInfo": "這是一個在沒有評論時,AI會自行嘗試繼續會話的模式。目前僅支援 OpenAI, Anthropic Claude, Google Gemini",
"ConversationContinuityModeInfo2": "由於一次回答可能多次調用 LLM,因此 API 使用費用可能會增加,請注意。",
"ConversationContinuityModeInfo3": "在 gpt-4o、gpt-4-turbo、claude-3-opus、claude-3.5-sonnet 上能夠比較穩定地運行。",
"StatusOn": "狀態:開",
Expand All @@ -24,14 +28,15 @@
"OpenAIAPIKeyLabel": "OpenAI API 金鑰",
"AnthropicAPIKeyLabel": "Anthropic API 金鑰",
"GoogleAPIKeyLabel": "Google Gemini API 金鑰",
"AzureAPIKeyLabel": "Azure OpenAI API 金鑰",
"AzureAPIURL": "Azure OpenAI API URL",
"GroqAPIKeyLabel": "Groq API 金鑰",
"DifyAPIKeyLabel": "Dify API 金鑰",
"APIKeyInstruction": "您可以在下方獲取 API 金鑰。請將獲得的 API 金鑰輸入到表單中。",
"ChatGPTInfo": "ChatGPT API 直接從瀏覽器存取。",
"LocalLLMInfo": "Local LLM 伺服器必須正在運行。",
"LocalLLMInfo2": "Local LLM 伺服器URL 和 模型名 必須正確填寫。",
"GroqInfo": "Groq API 直接從瀏覽器存取。",
"DifyInfo": "Dify 只支援聊天機器人型態",
"DifyInfo": "Dify 只支援聊天機器人和代理型態",
"DifyInfo2": "会話履歴的長度取決於Dify聊天機器人的規格。",
"DifyInfo3": "例:http://localhost:80/v1/chat-messages",
"DifyInstruction": "如果您正在使用 Dify,則此系統提示將不會被使用。請將 Dify 聊天機器人設定為系統提示。",
Expand Down Expand Up @@ -107,9 +112,9 @@
"ShowControlPanelInfo": "可以通过按 Cmd + . (Mac) / Ctrl + . (Windows) 来显示设置界面。",
"SlideMode": "投影片模式",
"SelectedSlideDocs": "使用的投影片",
"SlideModeDescription": "這是一個 AI 自動展示投影片的模式。僅在選擇的 AI 服務為 OpenAI、Anthropic Google Gemini 時有效。",
"SlideModeDescription": "這是一個 AI 自動展示投影片的模式。僅在選擇的 AI 服務為 OpenAI、Anthropic Claude或 Google Gemini 時有效。",
"PdfConvertLabel": "PDF 投影片轉換",
"PdfConvertDescription": "將 PDF 轉換為投影片模式數據。僅在選擇的 AI 服務為 OpenAI 時可用。",
"PdfConvertDescription": "將 PDF 轉換為投影片模式數據。僅在選擇的 AI 服務為 OpenAI、Anthropic Claude或 Google Gemini 時可用。",
"PdfConvertFileUpload": "選擇 PDF 文件",
"PdfConvertFolderName": "保存文件夹名称",
"PdfConvertModelSelect": "选择模型",
Expand Down
Loading

0 comments on commit 93cbf9d

Please sign in to comment.