mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 15:23:51 +00:00
update router client
This commit is contained in:
parent
46bf0192a1
commit
47a51289ca
2 changed files with 18 additions and 0 deletions
|
@ -98,6 +98,17 @@ async def run_main(host: str, port: int, stream: bool):
|
|||
async for log in EventLogger().log(iterator):
|
||||
log.print()
|
||||
|
||||
print("Testing a different model provider")
|
||||
iterator = client.chat_completion(
|
||||
ChatCompletionRequest(
|
||||
model="ollama-1",
|
||||
messages=[message],
|
||||
stream=stream,
|
||||
)
|
||||
)
|
||||
async for log in EventLogger().log(iterator):
|
||||
log.print()
|
||||
|
||||
|
||||
def main(host: str, port: int, stream: bool = True):
|
||||
asyncio.run(run_main(host, port, stream))
|
||||
|
|
|
@ -105,6 +105,13 @@ class OllamaInferenceAdapter(Inference):
|
|||
delta="",
|
||||
)
|
||||
)
|
||||
|
||||
yield ChatCompletionResponseStreamChunk(
|
||||
event=ChatCompletionResponseEvent(
|
||||
event_type=ChatCompletionResponseEventType.progress,
|
||||
delta="model={}, url={}".format(model, self.url),
|
||||
)
|
||||
)
|
||||
# request = ChatCompletionRequest(
|
||||
# model=model,
|
||||
# messages=messages,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue