forked from phoenix-oss/llama-stack-mirror
Allow simpler initialization of RemoteProviderConfig
; fix issue in httpx client
This commit is contained in:
parent
064d2a5287
commit
489f74a70b
3 changed files with 28 additions and 9 deletions
|
@ -143,14 +143,21 @@ def create_api_client_class(protocol, additional_protocol) -> Type:
|
|||
else:
|
||||
data.update(convert(kwargs))
|
||||
|
||||
return dict(
|
||||
ret = dict(
|
||||
method=webmethod.method or "POST",
|
||||
url=url,
|
||||
headers={"Content-Type": "application/json"},
|
||||
params=params,
|
||||
json=data,
|
||||
headers={
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
timeout=30,
|
||||
)
|
||||
if params:
|
||||
ret["params"] = params
|
||||
if data:
|
||||
ret["json"] = data
|
||||
|
||||
return ret
|
||||
|
||||
# Add protocol methods to the wrapper
|
||||
for p in protocols:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue