mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
Quick example illustrating get_request_provider_data
This commit is contained in:
parent
9eb5ec3e4b
commit
8266c75246
4 changed files with 18 additions and 2 deletions
|
@ -68,7 +68,10 @@ class InferenceClient(Inference):
|
|||
"POST",
|
||||
f"{self.base_url}/inference/chat_completion",
|
||||
json=encodable_dict(request),
|
||||
headers={"Content-Type": "application/json"},
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
"X-LlamaStack-ProviderData": json.dumps({"tgi_api_key": "1234"}),
|
||||
},
|
||||
timeout=20,
|
||||
) as response:
|
||||
if response.status_code != 200:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue