Miscs
This commit is contained in:
+11
-3
@@ -182,6 +182,7 @@ def generate_request(input_dir, file, full_label):
|
||||
]
|
||||
|
||||
generate_content_config = types.GenerateContentConfig(
|
||||
automatic_function_calling=types.AutomaticFunctionCallingConfig(disable=True),
|
||||
temperature=1.0,
|
||||
top_p=0.95,
|
||||
seed=0,
|
||||
@@ -259,6 +260,7 @@ Commentaires d'origine :
|
||||
]
|
||||
|
||||
config = types.GenerateContentConfig(
|
||||
automatic_function_calling=types.AutomaticFunctionCallingConfig(disable=True),
|
||||
temperature=1.0,
|
||||
response_mime_type="application/json",
|
||||
response_json_schema=TypeAdapter(List[FeedbackItem]).json_schema()
|
||||
@@ -288,7 +290,10 @@ Voici les labels possibles. Ta réponse doit être l'un d'entre eux :
|
||||
contents = [types.Content(role="user", parts=[
|
||||
types.Part.from_bytes(data=get_single_image_bytes(pdf_path), mime_type="image/jpeg"),
|
||||
types.Part.from_text(text=prompt)])]
|
||||
config = types.GenerateContentConfig(temperature=1.0)
|
||||
config = types.GenerateContentConfig(
|
||||
automatic_function_calling=types.AutomaticFunctionCallingConfig(disable=True),
|
||||
temperature=1.0,
|
||||
)
|
||||
return contents, config
|
||||
|
||||
def request_for_additional_answer(pdf_path, label, enonce, labels_txt):
|
||||
@@ -316,6 +321,9 @@ d'entre eux :
|
||||
types.Part.from_bytes(data=get_single_image_bytes(pdf_path), mime_type="image/jpeg"),
|
||||
types.Part.from_text(text=prompt)
|
||||
])]
|
||||
config = types.GenerateContentConfig(temperature=1.0, response_mime_type="application/json")
|
||||
config = types.GenerateContentConfig(
|
||||
automatic_function_calling=types.AutomaticFunctionCallingConfig(disable=True),
|
||||
temperature=1.0,
|
||||
response_mime_type="application/json",
|
||||
)
|
||||
return contents, config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user