Made package
This commit is contained in:
parent
ad5a526124
commit
7e5e7dd2b4
13
make
13
make
@ -3,8 +3,18 @@ import pathlib
|
|||||||
import os
|
import os
|
||||||
import sys
|
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():
|
if not pathlib.Path(".venv").exists():
|
||||||
os.system("python3 -m venv .venv")
|
os.system("python3 -m venv .venv")
|
||||||
|
install()
|
||||||
|
|
||||||
|
if "install" in args:
|
||||||
|
install()
|
||||||
|
|
||||||
if "build" in sys.argv:
|
if "build" in sys.argv:
|
||||||
os.system("./.venv/bin/python -m pip install build")
|
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 pip install black")
|
||||||
os.system("./.venv/bin/python -m black .")
|
os.system("./.venv/bin/python -m black .")
|
||||||
|
|
||||||
|
if "run" in sys.argv:
|
||||||
|
os.system("./.venv/bin/yura " + args_string)
|
||||||
|
|
||||||
|
@ -8,3 +8,35 @@ License: MIT
|
|||||||
Requires-Python: >=3.7
|
Requires-Python: >=3.7
|
||||||
Description-Content-Type: text/markdown
|
Description-Content-Type: text/markdown
|
||||||
Requires-Dist: websockets
|
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())
|
||||||
|
```
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
README.md
|
||||||
pyproject.toml
|
pyproject.toml
|
||||||
setup.cfg
|
setup.cfg
|
||||||
src/yura.egg-info/PKG-INFO
|
src/yura.egg-info/PKG-INFO
|
||||||
|
Loading…
Reference in New Issue
Block a user