You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dataforseo_client/models/ai_optimization_chat_gpt_llm_responses_live_request_info.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,11 +20,11 @@ class AiOptimizationChatGptLlmResponsesLiveRequestInfo(BaseModel):
20
20
model_name: Optional[StrictStr] =Field(default=None, description=r"name of the AI modelrequired fieldmodel_nameconsists of the actual model name and version name;if the basic model name is specified, its latest version will be set by default;for example, if gpt-4.1 is specified, the gpt-4.1-2025-04-14 will be set as model_name automatically;you can receive the list of available LLM models by making a separate request to the https://api.dataforseo.com/v3/ai_optimization/chat_gpt/llm_responses/models")
21
21
max_output_tokens: Optional[StrictInt] =Field(default=None, description=r"maximum number of tokens in the AI responseoptional fieldminimum value for reasoning models (e.g., reasoning is true in the Models endpoint): 1024;minimum value for non-reasoning models: 16;maximum value: 4096;default value: 2048Note: if web_search is set to true or the reasoning model is specified in the request, the output token count may exceed the specified max_output_tokens limit")
22
22
temperature: Optional[StrictFloat] =Field(default=None, description=r"randomness of the AI responseoptional fieldhigher values make output more diverse; lower values make output more focused;minimum value: 0maximum value: 2default value: 0.94Note: not supported in reasoning models")
top_p: Optional[StrictFloat] =Field(default=None, description=r"diversity of the AI responseoptional field controls diversity of the response by limiting token selection;minimum value: 0maximum value: 1 default value: 0.92Note: top_p cannot be used together with temperature in the same request")
24
24
web_search: Optional[StrictBool] =Field(default=None, description=r"enable web searchoptional fieldwhen enabled, the AI model can access and cite current web information;default value: false;Note: refer to the Models endpoint for a list of models that support web_search;")
25
25
force_web_search: Optional[StrictBool] =Field(default=None, description=r"force AI agent to use web searchoptional fieldto enable this parameter, web_search must also be enabled;when enabled, the AI model is forced to access and cite current web information;default value: false;Note: even if the parameter is set to true, there is no guarantee web sources will be cited in the response Note #2: not supported in reasoning models")
26
-
web_search_country_iso_code: Optional[StrictStr] =Field(default=None, description=r"ISO country code of the locationoptional fieldrequired if web_search_city is specified;to enable this parameter, web_search must also be enabled;when enabled, the AI model will search the web from the country you specify;Note: not supported in o3-mini, o1-pro, o1 models")
27
-
web_search_city: Optional[StrictStr] =Field(default=None, description=r"city name of the locationoptional fieldNote: specify web_search_country_iso_code to use this parameterNote #2: not supported in o3-mini, o1-pro, o1 models")
26
+
web_search_country_iso_code: Optional[StrictStr] =Field(default=None, description=r"ISO country code of the locationoptional fieldto enable this parameter, web_search must also be enabled;when enabled, the AI model will search the web from the country you specify;Note: not supported in o3-mini, o1-pro, o1 models")
27
+
web_search_city: Optional[StrictStr] =Field(default=None, description=r"city name of the locationoptional fieldNote: not supported in o3-mini, o1-pro, o1 models")
28
28
system_message: Optional[StrictStr] =Field(default=None, description=r"instructions for the AI behaviouroptional fielddefines the AI's role, tone, or specific behavior you can specify up to 500 characters in the system_message field")
29
29
message_chain: Optional[List[Optional[LlmMessageChainItem]]] =Field(default=None, description=r"conversation history. optional field. array of message objects representing previous conversation turns;. each object must contain:. role string with either user or ai role;. message string with message content (max 500 characters);. you can specify maximum of 10 message objects in the array;. Note: for Perplexity models, messages must strictly alternate between user and AI roles (user → ai);. example:. 'message_chain': [{'role':'user','message':'Hello, what’s up?'},{'role':'ai','message':'Hello! I’m doing well, thank you. How can I assist you today?'}]")
30
30
tag: Optional[StrictStr] =Field(default=None, description=r"user-defined task identifieroptional fieldthe character limit is 255you can use this parameter to identify the task and match it with the resultyou will find the specified tag value in the data object of the response")
Copy file name to clipboardExpand all lines: dataforseo_client/models/ai_optimization_chat_gpt_llm_responses_task_post_request_info.py
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,11 @@ class AiOptimizationChatGptLlmResponsesTaskPostRequestInfo(BaseModel):
20
20
model_name: Optional[StrictStr] =Field(default=None, description=r"name of the AI modelrequired fieldmodel_nameconsists of the actual model name and version name;if the basic model name is specified, its latest version will be set by default;for example, if gpt-4.1 is specified, the gpt-4.1-2025-04-14 will be set as model_name automatically;you can receive the list of available LLM models by making a separate request to the https://api.dataforseo.com/v3/ai_optimization/chat_gpt/llm_responses/models")
21
21
max_output_tokens: Optional[StrictInt] =Field(default=None, description=r"maximum number of tokens in the AI responseoptional fieldminimum value for reasoning models (e.g., reasoning is true in the Models endpoint): 1024;minimum value for non-reasoning models: 16;maximum value: 4096;default value: 2048")
22
22
temperature: Optional[StrictFloat] =Field(default=None, description=r"randomness of the AI responseoptional fieldhigher values make output more diverse; lower values make output more focused;minimum value: 0maximum value: 2default value: 0.94Note: not supported in reasoning models")
top_p: Optional[StrictFloat] =Field(default=None, description=r"diversity of the AI responseoptional field controls diversity of the response by limiting token selection;minimum value: 0maximum value: 1 default value: 0.92Note: top_p cannot be used together with temperature in the same request")
24
+
web_search: Optional[StrictBool] =Field(default=None, description=r"enable web searchoptional fieldwhen enabled, the AI model can access and cite current web information;default value: false;Note: refer to the Models endpoint for a list of models that support web_search;")
25
+
force_web_search: Optional[StrictBool] =Field(default=None, description=r"force AI agent to use web searchoptional fieldto enable this parameter, web_search must also be enabled;when enabled, the AI model is forced to access and cite current web information;default value: false;Note: even if the parameter is set to true, there is no guarantee web sources will be cited in the response Note #2: not supported in reasoning models")
26
+
web_search_country_iso_code: Optional[StrictStr] =Field(default=None, description=r"ISO country code of the locationoptional fieldto enable this parameter, web_search must also be enabled;when enabled, the AI model will search the web from the country you specify;Note: not supported in o3-mini, o1-pro, o1 models")
27
+
web_search_city: Optional[StrictStr] =Field(default=None, description=r"city name of the locationoptional fieldNote: not supported in o3-mini, o1-pro, o1 models")
24
28
system_message: Optional[StrictStr] =Field(default=None, description=r"instructions for the AI behaviouroptional fielddefines the AI's role, tone, or specific behavior;you can specify up to 500 characters in the system_message field")
25
29
message_chain: Optional[List[Optional[LlmMessageChainItem]]] =Field(default=None, description=r"conversation history. optional field. array of message objects representing previous conversation turns;. each object must contain:. role string with either user or ai role;. message string with message content (max 500 characters);. you can specify maximum of 10 message objects in the array;. Note: for Perplexity models, messages must strictly alternate between user and AI roles (user → ai);. example:. 'message_chain': [{'role':'user','message':'Hello, what’s up?'},{'role':'ai','message':'Hello! I’m doing well, thank you. How can I assist you today?'}]")
26
30
postback_url: Optional[StrictStr] =Field(default=None, description=r"URL for sending task resultsoptional fieldonce the task is completed, we will send a POST request with its results compressed in the gzip format to the postback_url you specifiedyou can use the ‘$id’ string as a $id variable and ‘$tag’ as urlencoded $tag variable. We will set the necessary values before sending the request.example:http://your-server.com/postbackscript?id=$idhttp://your-server.com/postbackscript?id=$id&tag=$tagNote: special character in postback_url will be urlencoded;i.a., the # character will be encoded into %23learn more on our Help Center")
@@ -32,6 +36,10 @@ class AiOptimizationChatGptLlmResponsesTaskPostRequestInfo(BaseModel):
Copy file name to clipboardExpand all lines: dataforseo_client/models/ai_optimization_claude_llm_responses_live_request_info.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,8 @@ class AiOptimizationClaudeLlmResponsesLiveRequestInfo(BaseModel):
23
23
top_p: Optional[StrictFloat] =Field(default=None, description=r"diversity of the AI responseoptional field controls diversity of the response by limiting token selection;minimum value: 0maximum value: 1 default value: nullNote: top_p cannot be used together with temperature in the same request")
24
24
web_search: Optional[StrictBool] =Field(default=None, description=r"enable web search for current informationoptional fieldwhen enabled, the AI model can access and cite current web information;Note: refer to the Models endpoint for a list of models that support web_search; default value: false;The cost of the parameter can be calculated on the Pricing page")
25
25
force_web_search: Optional[StrictBool] =Field(default=None, description=r"force AI agent to use web searchoptional fieldto enable this parameter, web_search must also be enabled;when enabled, the AI model is forced to access and cite current web information;default value: false;Note: even if the parameter is set to true, there is no guarantee web sources will be cited in the response")
26
-
web_search_country_iso_code: Optional[StrictStr] =Field(default=None, description=r"ISO country code of the locationoptional fieldpossible values: 'AR','AT','AU','BE','BR','CA','CH','CL','CN','DE','DK','ES','FI','FR','GB','HK','ID','IN','IT','JP','KR','MX','MY','NL','NO','NZ','PH','PL','PT','RU','SA','SE','TR','TW','US','ZA'")
27
-
web_search_city: Optional[StrictStr] =Field(default=None, description=r"city name of the locationoptional fieldNote: specify web_search_country_iso_code to use this parameter")
26
+
web_search_country_iso_code: Optional[StrictStr] =Field(default=None, description=r"ISO country code of the location used for searching the weboptional fieldpossible values: 'AR','AT','AU','BE','BR','CA','CH','CL','CN','DE','DK','ES','FI','FR','GB','HK','ID','IN','IT','JP','KR','MX','MY','NL','NO','NZ','PH','PL','PT','RU','SA','SE','TR','TW','US','ZA'")
27
+
web_search_city: Optional[StrictStr] =Field(default=None, description=r"city name of the location used for searching the weboptional field")
28
28
system_message: Optional[StrictStr] =Field(default=None, description=r"instructions for the AI behaviouroptional fielddefines the AI's role, tone, or specific behavior;you can specify up to 500 characters in the system_message field")
29
29
message_chain: Optional[List[Optional[LlmMessageChainItem]]] =Field(default=None, description=r"conversation history. optional field. array of message objects representing previous conversation turns;. each object must contain:. role string with either user or ai role;. message string with message content (max 500 characters);. you can specify maximum of 10 message objects in the array;. Note: for Perplexity models, messages must strictly alternate between user and AI roles (user → ai);. example:. 'message_chain': [{'role':'user','message':'Hello, what’s up?'},{'role':'ai','message':'Hello! I’m doing well, thank you. How can I assist you today?'}]")
30
30
use_reasoning: Optional[StrictBool] =Field(default=None, description=r"enable reasoning for the AI modeloptional fieldwhen enabled, the model will perform reasoning before generating a responserefer to the Models endpoint for a list of models that support reasoningdefault value: falseNote: if set to true, the minimum value for max_output_tokens is 1025Note #2: if set to true, force_web_search must be set to falseNote #3: if set to true, the temperature and top_p cannot be used")
Copy file name to clipboardExpand all lines: dataforseo_client/models/ai_optimization_claude_llm_responses_task_post_request_info.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,8 @@ class AiOptimizationClaudeLlmResponsesTaskPostRequestInfo(BaseModel):
23
23
top_p: Optional[StrictFloat] =Field(default=None, description=r"diversity of the AI responseoptional field controls diversity of the response by limiting token selection;minimum value: 0maximum value: 1 default value: nullNote: top_p cannot be used together with temperature in the same request")
24
24
web_search: Optional[StrictBool] =Field(default=None, description=r"enable web search for current informationoptional fieldwhen enabled, the AI model can access and cite current web information;Note: refer to the Models endpoint for a list of models that support web_search; default value: false;The cost of the parameter can be calculated on the Pricing page")
25
25
force_web_search: Optional[StrictBool] =Field(default=None, description=r"force AI agent to use web searchoptional fieldto enable this parameter, web_search must also be enabled;when enabled, the AI model is forced to access and cite current web information;default value: false;Note: even if the parameter is set to true, there is no guarantee web sources will be cited in the response")
26
-
web_search_country_iso_code: Optional[StrictStr] =Field(default=None, description=r"ISO country code of the locationoptional fieldpossible values: 'AR','AT','AU','BE','BR','CA','CH','CL','CN','DE','DK','ES','FI','FR','GB','HK','ID','IN','IT','JP','KR','MX','MY','NL','NO','NZ','PH','PL','PT','RU','SA','SE','TR','TW','US','ZA'")
27
-
web_search_city: Optional[StrictStr] =Field(default=None, description=r"city name of the locationoptional fieldNote: specify web_search_country_iso_code to use this parameter")
26
+
web_search_country_iso_code: Optional[StrictStr] =Field(default=None, description=r"ISO country code of the location used for searching the weboptional fieldpossible values: 'AR','AT','AU','BE','BR','CA','CH','CL','CN','DE','DK','ES','FI','FR','GB','HK','ID','IN','IT','JP','KR','MX','MY','NL','NO','NZ','PH','PL','PT','RU','SA','SE','TR','TW','US','ZA'")
27
+
web_search_city: Optional[StrictStr] =Field(default=None, description=r"city name of the location used for searching the weboptional field")
28
28
system_message: Optional[StrictStr] =Field(default=None, description=r"instructions for the AI behaviouroptional fielddefines the AI's role, tone, or specific behavior;you can specify up to 500 characters in the system_message field")
29
29
message_chain: Optional[List[Optional[LlmMessageChainItem]]] =Field(default=None, description=r"conversation history. optional field. array of message objects representing previous conversation turns;. each object must contain:. role string with either user or ai role;. message string with message content (max 500 characters);. you can specify maximum of 10 message objects in the array;. Note: for Perplexity models, messages must strictly alternate between user and AI roles (user → ai);. example:. 'message_chain': [{'role':'user','message':'Hello, what’s up?'},{'role':'ai','message':'Hello! I’m doing well, thank you. How can I assist you today?'}]")
30
30
use_reasoning: Optional[StrictBool] =Field(default=None, description=r"enable reasoning for the AI modeloptional fieldwhen enabled, the model will perform reasoning before generating a responserefer to the Models endpoint for a list of models that support reasoningdefault value: falseNote: if set to true, the minimum value for max_output_tokens is 1025Note #2: if set to true, force_web_search must be set to falseNote #3: if set to true, the temperature and top_p cannot be used")
0 commit comments