update Gemini API : use thinking levels
This commit is contained in:
1 parent
7bc588e9a1
commit
ec6ac9580b
9 files changed
+161
-21
No files matched your search
@@ -26,6 +26,7 @@ from copienator import (
|
||||
workspace_from_args,
|
||||
)
|
||||
from copienator import configuration as config
|
||||
from copienator.gemini_config import thinking_config
|
||||
from copienator.filesystem import staged_files
|
||||
from copienator.latex_json import normalize_literal_newlines, repair_latex_json
|
||||
from copienator.platform import validate_windows_labels
|
||||
@@ -249,7 +250,7 @@ def _request_rubrics(client, group_context_text: str):
|
||||
config=types.GenerateContentConfig(
|
||||
automatic_function_calling=types.AutomaticFunctionCallingConfig(disable=True),
|
||||
system_instruction="Rédige tous les barèmes et consignes de notation en français. Conserve les clés JSON, les labels et les formules mathématiques.",
|
||||
temperature=0.2,
|
||||
thinking_config=thinking_config(config.THINKING_LEVEL_LITE),
|
||||
response_mime_type="application/json",
|
||||
response_json_schema=GroupRubrics.model_json_schema(),
|
||||
),
|
||||
@@ -370,7 +371,7 @@ def refine_existing(workspace: EvaluationWorkspace, mode: str, *, api_client=Non
|
||||
))])],
|
||||
config=types.GenerateContentConfig(
|
||||
automatic_function_calling=types.AutomaticFunctionCallingConfig(disable=True),
|
||||
temperature=0.1, response_mime_type="application/json",
|
||||
thinking_config=thinking_config(config.THINKING_LEVEL_LITE), response_mime_type="application/json",
|
||||
response_json_schema=LabelGroups.model_json_schema(),
|
||||
),
|
||||
)
|
||||
@@ -488,7 +489,7 @@ def process_exam(
|
||||
|
||||
config_1 = types.GenerateContentConfig(
|
||||
automatic_function_calling=types.AutomaticFunctionCallingConfig(disable=True),
|
||||
temperature=0.1,
|
||||
thinking_config=thinking_config(config.THINKING_LEVEL_LITE),
|
||||
response_mime_type="application/json",
|
||||
response_json_schema=ExamQuestions.model_json_schema(),
|
||||
)
|
||||
@@ -505,7 +506,7 @@ def process_exam(
|
||||
|
||||
config_2 = types.GenerateContentConfig(
|
||||
automatic_function_calling=types.AutomaticFunctionCallingConfig(disable=True),
|
||||
temperature=0.1,
|
||||
thinking_config=thinking_config(config.THINKING_LEVEL_LITE),
|
||||
response_mime_type="application/json",
|
||||
response_json_schema=ExamSolutions.model_json_schema(),
|
||||
)
|
||||
@@ -540,7 +541,7 @@ def process_exam(
|
||||
|
||||
config_3 = types.GenerateContentConfig(
|
||||
automatic_function_calling=types.AutomaticFunctionCallingConfig(disable=True),
|
||||
temperature=0.1,
|
||||
thinking_config=thinking_config(config.THINKING_LEVEL_LITE),
|
||||
response_mime_type="application/json",
|
||||
response_json_schema=ExamContext.model_json_schema(),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user