Merge pull request #131 from GiGiDKR/feat-local_support_with_UTF-8_encoding-update

feat: local support with utf 8 encoding
This commit is contained in:
Beehive Innovations
2025-06-27 08:02:14 -07:00
committed by GitHub
25 changed files with 1845 additions and 75 deletions

View File

@@ -1084,6 +1084,26 @@ Consider requesting searches for:
When recommending searches, be specific about what information you need and why it would improve your analysis. Always remember to instruct Claude to use the continuation_id from this response when providing search results."""
def get_language_instruction(self) -> str:
"""
Generate language instruction based on LOCALE configuration.
Returns:
str: Language instruction to prepend to prompt, or empty string if
no locale set
"""
# Read LOCALE directly from environment to support dynamic changes
# This allows tests to modify os.environ["LOCALE"] and see the changes
import os
locale = os.getenv("LOCALE", "").strip()
if not locale:
return ""
# Simple language instruction
return f"Always respond in {locale}.\n\n"
# === ABSTRACT METHODS FOR SIMPLE TOOLS ===
@abstractmethod