Move system_instruction into LLMSettings
Add `system_instruction` field to `LLMSettings` so it is runtime-updatable via settings. For Google (GoogleLLMService, GoogleVertexLLMService), deprecate the init-time arg since it was already shipped. For Anthropic, AWS Bedrock, and OpenAI, remove the init-time arg entirely since it was never shipped. Add system instruction prepend logic to `build_chat_completion_params` overrides in Cerebras, SambaNova, Fireworks, Mistral, and Perplexity, which build params from scratch rather than calling `super()`. Still need to handle realtime services (OpenAI Realtime, Grok Realtime, Gemini Live).
This commit is contained in:
@@ -199,8 +199,8 @@ Your response will be turned into speech so use only simple words and punctuatio
|
||||
llm = GoogleLLMService(
|
||||
settings=GoogleLLMSettings(
|
||||
model=VOICE_MODEL,
|
||||
system_instruction=system_prompt,
|
||||
),
|
||||
system_instruction=system_prompt,
|
||||
api_key=os.getenv("GOOGLE_API_KEY"),
|
||||
)
|
||||
llm.register_function("query_knowledge_base", query_knowledge_base)
|
||||
|
||||
Reference in New Issue
Block a user