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
The version alias or number of the function to query. If not provided, the latest version will be used. Pass -1 to use the latest version.
471
478
version_number : int, optional
472
479
The version number of the function to query. If not provided, the latest version will be used. Pass -1 to use the latest version.
473
480
text_input : str, optional
@@ -485,6 +492,7 @@ async def aquery(
485
492
"""
486
493
returnawaitself._query(
487
494
fn_name=fn_name,
495
+
version=version,
488
496
version_number=version_number,
489
497
text_input=text_input,
490
498
images_input=images_input,
@@ -495,6 +503,7 @@ async def aquery(
495
503
defquery(
496
504
self,
497
505
fn_name: str,
506
+
version: Optional[Union[str, int]] =-1,
498
507
version_number: Optional[int] =-1,
499
508
text_input: Optional[str] ="",
500
509
images_input: Optional[List[str]] = [],
@@ -523,6 +532,7 @@ def query(
523
532
"""
524
533
returnself._query(
525
534
fn_name=fn_name,
535
+
version=version,
526
536
version_number=version_number,
527
537
text_input=text_input,
528
538
images_input=images_input,
@@ -534,6 +544,7 @@ def batch_query(
534
544
self,
535
545
fn_name: str,
536
546
batch_inputs: List[Dict[str, Any]],
547
+
version: Optional[Union[str, int]] =-1,
537
548
version_number: Optional[int] =-1,
538
549
return_reasoning: Optional[bool] =False,
539
550
) ->List[Dict[str, Any]]:
@@ -547,6 +558,8 @@ def batch_query(
547
558
A list of inputs for the functions to query. The input must be a dictionary containing the data to be processed. e.g.,
548
559
when providing for a text input, the dictionary should be {"text_input": "input text"}, for an image input, the dictionary should be {"images_input": ["url1", "url2", ...]}
549
560
and for a combination of text and image inputs, the dictionary should be {"text_input": "input text", "images_input": ["url1", "url2", ...]}.
561
+
version : Union[str, int], optional
562
+
The version alias or number of the function to query. If not provided, the latest version will be used. Pass -1 to use the latest version.
550
563
version_number : int, optional
551
564
The version number of the function to query. If not provided, the latest version will be used. Pass -1 to use the latest version.
The version alias or number of the function to query. If not provided, the latest version is used. Default is -1 for the same behavior.
64
67
version_number : int, optional
65
68
The version number of the function to query. If not provided, the latest version is used. Default is -1 for the same behavior.
66
69
text_input : str, optional
@@ -81,6 +84,7 @@ def query(
81
84
client=WecoAI(api_key=api_key)
82
85
response=client.query(
83
86
fn_name=fn_name,
87
+
version=version,
84
88
version_number=version_number,
85
89
text_input=text_input,
86
90
images_input=images_input,
@@ -91,6 +95,7 @@ def query(
91
95
92
96
asyncdefaquery(
93
97
fn_name: str,
98
+
version: Optional[Union[str, int]] =-1,
94
99
version_number: Optional[int] =-1,
95
100
text_input: Optional[str] ="",
96
101
images_input: Optional[List[str]] = [],
@@ -103,6 +108,8 @@ async def aquery(
103
108
----------
104
109
fn_name : str
105
110
The name of the function to query.
111
+
version: str | int, optional
112
+
The version number or alias of the function to query. If not provided, the latest version is used. Default is -1 for the same behavior.
106
113
version_number : int, optional
107
114
The version number of the function to query. If not provided, the latest version is used. Default is -1 for the same behavior.
108
115
text_input : str, optional
@@ -123,6 +130,7 @@ async def aquery(
123
130
client=WecoAI(api_key=api_key)
124
131
response=awaitclient.aquery(
125
132
fn_name=fn_name,
133
+
version=version,
126
134
version_number=version_number,
127
135
text_input=text_input,
128
136
images_input=images_input,
@@ -134,6 +142,7 @@ async def aquery(
134
142
defbatch_query(
135
143
fn_name: str,
136
144
batch_inputs: List[Dict[str, Any]],
145
+
version: Optional[Union[str, int]] =-1,
137
146
version_number: Optional[int] =-1,
138
147
return_reasoning: Optional[bool] =False,
139
148
api_key: Optional[str] =None,
@@ -153,6 +162,8 @@ def batch_query(
153
162
A list of inputs for the functions to query. The input must be a dictionary containing the data to be processed. e.g.,
154
163
when providing for a text input, the dictionary should be {"text_input": "input text"}, for an image input, the dictionary should be {"images_input": ["url1", "url2", ...]}
155
164
and for a combination of text and image inputs, the dictionary should be {"text_input": "input text", "images_input": ["url1", "url2", ...]}.
165
+
version : str | int, optional
166
+
The version number or alias of the function to query. If not provided, the latest version is used. Default is -1 for the same behavior.
156
167
version_number : int, optional
157
168
The version number of the function to query. If not provided, the latest version is used. Default is -1 for the same behavior.
0 commit comments