@@ -43,7 +43,7 @@ def connect(
4343 eager_eot_threshold : typing .Optional [str ] = None ,
4444 eot_threshold : typing .Optional [str ] = None ,
4545 eot_timeout_ms : typing .Optional [str ] = None ,
46- keyterm : typing .Optional [str ] = None ,
46+ keyterm : typing .Optional [typing . Union [ str , typing . List [ str ]] ] = None ,
4747 mip_opt_out : typing .Optional [str ] = None ,
4848 tag : typing .Optional [str ] = None ,
4949 authorization : typing .Optional [str ] = None ,
@@ -67,7 +67,8 @@ def connect(
6767
6868 eot_timeout_ms : typing.Optional[str]
6969
70- keyterm : typing.Optional[str]
70+ keyterm : typing.Optional[typing.Union[str, typing.List[str]]]
71+ Single keyterm as string or list of keyterms. Each keyterm can be up to 100 characters.
7172
7273 mip_opt_out : typing.Optional[str]
7374
@@ -100,7 +101,11 @@ def connect(
100101 if eot_timeout_ms is not None :
101102 query_params = query_params .add ("eot_timeout_ms" , eot_timeout_ms )
102103 if keyterm is not None :
103- query_params = query_params .add ("keyterm" , keyterm )
104+ if isinstance (keyterm , list ):
105+ for kt in keyterm :
106+ query_params = query_params .add ("keyterm" , kt )
107+ else :
108+ query_params = query_params .add ("keyterm" , keyterm )
104109 if mip_opt_out is not None :
105110 query_params = query_params .add ("mip_opt_out" , mip_opt_out )
106111 if tag is not None :
@@ -154,7 +159,7 @@ async def connect(
154159 eager_eot_threshold : typing .Optional [str ] = None ,
155160 eot_threshold : typing .Optional [str ] = None ,
156161 eot_timeout_ms : typing .Optional [str ] = None ,
157- keyterm : typing .Optional [str ] = None ,
162+ keyterm : typing .Optional [typing . Union [ str , typing . List [ str ]] ] = None ,
158163 mip_opt_out : typing .Optional [str ] = None ,
159164 tag : typing .Optional [str ] = None ,
160165 authorization : typing .Optional [str ] = None ,
@@ -178,7 +183,8 @@ async def connect(
178183
179184 eot_timeout_ms : typing.Optional[str]
180185
181- keyterm : typing.Optional[str]
186+ keyterm : typing.Optional[typing.Union[str, typing.List[str]]]
187+ Single keyterm as string or list of keyterms. Each keyterm can be up to 100 characters.
182188
183189 mip_opt_out : typing.Optional[str]
184190
@@ -211,7 +217,11 @@ async def connect(
211217 if eot_timeout_ms is not None :
212218 query_params = query_params .add ("eot_timeout_ms" , eot_timeout_ms )
213219 if keyterm is not None :
214- query_params = query_params .add ("keyterm" , keyterm )
220+ if isinstance (keyterm , list ):
221+ for kt in keyterm :
222+ query_params = query_params .add ("keyterm" , kt )
223+ else :
224+ query_params = query_params .add ("keyterm" , keyterm )
215225 if mip_opt_out is not None :
216226 query_params = query_params .add ("mip_opt_out" , mip_opt_out )
217227 if tag is not None :
0 commit comments