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:
wei840222 2025-08-17 17:38:47 +08:00
parent 9a772d6abe
commit f8896b0f7b
28 changed files with 318 additions and 258 deletions

View file

@ -34,6 +34,7 @@ The API accepts a JSON object in the request body, where you define the focus mo
["assistant", "I am doing well, how can I help you today?"]
],
"systemInstructions": "Focus on providing technical details about Perplexica's architecture.",
"locale": "en-US",
"stream": false
}
```
@ -66,6 +67,8 @@ The API accepts a JSON object in the request body, where you define the focus mo
- **`systemInstructions`** (string, optional): Custom instructions provided by the user to guide the AI's response. These instructions are treated as user preferences and have lower priority than the system's core instructions. For example, you can specify a particular writing style, format, or focus area.
- **`locale`** (string, optional): Specifies a custom locale for the search operation. If not provided, the default locale (en-US) will be used. This can be useful for tailoring search results to a specific language or region. Format: IETF BCP 47 codes ({ISO 639-1}-{ISO 3166-1 alpha-2}), see https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
- **`history`** (array, optional): An array of message pairs representing the conversation history. Each pair consists of a role (either 'human' or 'assistant') and the message content. This allows the system to use the context of the conversation to refine results. Example:
```json