Skip to content

Commit 4e0c442

Browse files
updated max_tokens specification
1 parent f9d17cc commit 4e0c442

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pm4py/algo/querying/llm/connectors/anthropic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def apply(prompt: str, parameters: Optional[Dict[Any, Any]] = None) -> str:
2727
image_path = exec_utils.get_param_value(Parameters.IMAGE_PATH, parameters, None)
2828
api_key = exec_utils.get_param_value(Parameters.API_KEY, parameters, constants.ANTHROPIC_API_KEY)
2929
api_url = exec_utils.get_param_value(Parameters.API_URL, parameters, None)
30-
max_tokens = exec_utils.get_param_value(Parameters.MAX_TOKENS, parameters, 4096)
30+
max_tokens = exec_utils.get_param_value(Parameters.MAX_TOKENS, parameters, 8192)
3131
simple_content_specification = image_path is None
3232

3333
if api_url is None:

pm4py/algo/querying/llm/connectors/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def apply(prompt: str, parameters: Optional[Dict[Any, Any]] = None) -> str:
5656
}
5757

5858
if image_path is not None:
59-
max_tokens = exec_utils.get_param_value(Parameters.MAX_TOKENS, parameters, 4096)
59+
max_tokens = exec_utils.get_param_value(Parameters.MAX_TOKENS, parameters, 16384)
6060
image_format = os.path.splitext(image_path)[1][1:].lower()
6161
base64_image = encode_image(image_path)
6262
messages[0]["content"].append({"type": "image_url", "image_url": {"url": f"data:image/{image_format};base64,{base64_image}"}})

0 commit comments

Comments
 (0)