feat(i18n): Refactor prompts and search agent to enhance language handling and formatting instructions
- Updated academicSearch, redditSearch, webSearch, wolframAlpha, writingAssistant, and youtubeSearch prompts to improve clarity and consistency in formatting instructions. - Added language handling instructions to writingAssistant and other prompts for better localization support. - Modified MetaSearchAgent to include locale and language parameters for improved prompt generation and language-specific responses. # Conflicts: # Dockerfile
This commit is contained in:
parent
9a772d6abe
commit
f8896b0f7b
28 changed files with 318 additions and 258 deletions
|
|
@ -1,6 +1,9 @@
|
|||
import { Message } from '@/components/ChatWindow';
|
||||
|
||||
export const getSuggestions = async (chatHisory: Message[]) => {
|
||||
export const getSuggestions = async (
|
||||
chatHistory: Message[],
|
||||
locale?: string,
|
||||
) => {
|
||||
const chatModel = localStorage.getItem('chatModel');
|
||||
const chatModelProvider = localStorage.getItem('chatModelProvider');
|
||||
|
||||
|
|
@ -13,7 +16,7 @@ export const getSuggestions = async (chatHisory: Message[]) => {
|
|||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
chatHistory: chatHisory,
|
||||
chatHistory: chatHistory,
|
||||
chatModel: {
|
||||
provider: chatModelProvider,
|
||||
model: chatModel,
|
||||
|
|
@ -22,6 +25,7 @@ export const getSuggestions = async (chatHisory: Message[]) => {
|
|||
customOpenAIBaseURL,
|
||||
}),
|
||||
},
|
||||
locale,
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue