Quick example illustrating get_request_provider_data

This commit is contained in:
Ashwin Bharambe 2024-09-23 15:38:14 -07:00
parent 9eb5ec3e4b
commit 8266c75246
4 changed files with 18 additions and 2 deletions

View file

@ -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: