From 7e5e7dd2b476b163506c99ac9e7f8d293e322744 Mon Sep 17 00:00:00 2001 From: retoor Date: Wed, 27 Nov 2024 21:26:27 +0100 Subject: [PATCH] Made package --- make | 13 ++++++++++++- src/yura.egg-info/PKG-INFO | 32 ++++++++++++++++++++++++++++++++ src/yura.egg-info/SOURCES.txt | 1 + 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/make b/make index e352104..e75862c 100755 --- a/make +++ b/make @@ -3,8 +3,18 @@ import pathlib import os import sys +args = sys.argv[1:] +args_string = " ".join(args) + +def install(): + os.system("./.venv/bin/python -m pip install -e .") + if not pathlib.Path(".venv").exists(): os.system("python3 -m venv .venv") + install() + +if "install" in args: + install() if "build" in sys.argv: os.system("./.venv/bin/python -m pip install build") @@ -12,5 +22,6 @@ if "build" in sys.argv: os.system("./.venv/bin/python -m pip install black") os.system("./.venv/bin/python -m black .") - +if "run" in sys.argv: + os.system("./.venv/bin/yura " + args_string) diff --git a/src/yura.egg-info/PKG-INFO b/src/yura.egg-info/PKG-INFO index b5da924..01361f1 100644 --- a/src/yura.egg-info/PKG-INFO +++ b/src/yura.egg-info/PKG-INFO @@ -8,3 +8,35 @@ License: MIT Requires-Python: >=3.7 Description-Content-Type: text/markdown Requires-Dist: websockets + +# Yura LLM Client for Katya server + +Part of project with as target replacing the native ollama protocol. This protocol supports streaming and is usable trough https and it is possible to directly attach a web client to the backend. + +## Install +```bash +pip install -e . +``` + +## Build +```bash +make build +``` + +## Command line usage +```bash +yura ws://[host]:[port]/[path]/ +``` + +## Python +```python +import asyncio +from yura.client import AsyncClient + +async def communicate(): + client = AsyncClient("ws://[host]:[port]/[path]/") + async for response in client.chat("Your prompt"): + print(response) + +asyncio.run(communicate()) +``` diff --git a/src/yura.egg-info/SOURCES.txt b/src/yura.egg-info/SOURCES.txt index 0b9922a..8a4b3b2 100644 --- a/src/yura.egg-info/SOURCES.txt +++ b/src/yura.egg-info/SOURCES.txt @@ -1,3 +1,4 @@ +README.md pyproject.toml setup.cfg src/yura.egg-info/PKG-INFO