mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-23 05:02:26 +00:00
test: add telemetry tests for openai
ensure openai completion routes produce metrics in the existing telemetry suite Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
parent
e2aefd797f
commit
e461246eed
22 changed files with 1224 additions and 27 deletions
|
|
@ -423,7 +423,7 @@ class InferenceRouter(Inference):
|
|||
prompt_logprobs=prompt_logprobs,
|
||||
suffix=suffix,
|
||||
)
|
||||
provider = self.routing_table.get_provider_impl(model_obj.identifier)
|
||||
provider = await self.routing_table.get_provider_impl(model_obj.identifier)
|
||||
if stream:
|
||||
return await provider.openai_completion(**params)
|
||||
# TODO: Metrics do NOT work with openai_completion stream=True due to the fact
|
||||
|
|
@ -523,7 +523,7 @@ class InferenceRouter(Inference):
|
|||
top_p=top_p,
|
||||
user=user,
|
||||
)
|
||||
provider = self.routing_table.get_provider_impl(model_obj.identifier)
|
||||
provider = await self.routing_table.get_provider_impl(model_obj.identifier)
|
||||
if stream:
|
||||
response_stream = await provider.openai_chat_completion(**params)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue