Skip to content

Commit c483ea1

Browse files
feat: reasoning_parameter integration (camel-ai#1715)
1 parent f47897c commit c483ea1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

camel/configs/openai_config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ class ChatGPTConfig(BaseConfig):
9494
forces the model to call that tool. :obj:`"none"` is the default
9595
when no tools are present. :obj:`"auto"` is the default if tools
9696
are present.
97+
reasoning_effort(str, optional): A parameter specifying the level of
98+
reasoning used by certain model types. Valid values are :obj:
99+
`"low"`, :obj:`"medium"`, or :obj:`"high"`. If set, it is only
100+
applied to the model types that support it (e.g., :obj:`o1`,
101+
:obj:`o1mini`, :obj:`o1preview`, :obj:`o3mini`). If not provided
102+
or if the model type does not support it, this parameter is
103+
ignored. (default: :obj:`None`)
97104
"""
98105

99106
temperature: float = 0.2 # openai default: 1.0
@@ -108,6 +115,7 @@ class ChatGPTConfig(BaseConfig):
108115
logit_bias: Dict = Field(default_factory=dict)
109116
user: str = ""
110117
tool_choice: Optional[Union[Dict[str, str], str]] = None
118+
reasoning_effort: Optional[str] = None
111119

112120

113121
OPENAI_API_PARAMS = {param for param in ChatGPTConfig.model_fields.keys()}

0 commit comments

Comments
 (0)