feat: Update generation configuration to include thinking mode and increase max output tokens

This commit is contained in:
Slipstream 2025-06-01 17:56:04 -06:00
parent 40a603ba33
commit 7627f192c7
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -1059,16 +1059,16 @@ CRITICAL: Do NOT output anything other than the required JSON response.
else:
model_path = model_id_to_use
thinking_config = types.ThinkingConfig(
mode="OFF", # or "AUTO" or "OFF"
token_limit=0 # Example manual thinking budget
)
generation_config = types.GenerateContentConfig(
temperature=0.2,
max_output_tokens=1000, # Ensure enough for JSON
max_output_tokens=2000, # Ensure enough for JSON
safety_settings=STANDARD_SAFETY_SETTINGS,
# Forcing JSON output with Vertex Gemini can be done by instructing the model
# or by using specific model versions/features if available.
# The prompt already strongly instructs JSON output.
# Some models might support response_mime_type="application/json" in generation_config
# response_mime_type="application/json", # Try this if model supports
thinking_config=thinking_config
)
# Construct contents for Vertex AI API