mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-05 04:17:32 +00:00
work with 2 different models
This commit is contained in:
parent
7071c46422
commit
4b083eec03
2 changed files with 37 additions and 19 deletions
|
@ -100,6 +100,17 @@ async def run_main(host: str, port: int, stream: bool):
|
|||
async for log in EventLogger().log(iterator):
|
||||
log.print()
|
||||
|
||||
cprint(f"User>{message.content}", "green")
|
||||
iterator = client.chat_completion(
|
||||
ChatCompletionRequest(
|
||||
model="Meta-Llama3.1-8B",
|
||||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue