diff --git a/extensions/llama/python/README.md b/extensions/llama/python/README.md index e69de29bb..0a043b452 100644 --- a/extensions/llama/python/README.md +++ b/extensions/llama/python/README.md @@ -0,0 +1,5 @@ +AIConfig Model Parser for LLama cpp (Python bindings). + +Usage: See cookbook: + +https://github.com/lastmile-ai/aiconfig/blob/c64224ed48ccb7f8cbd2d3a1b2e8bd250aeb9ff2/cookbooks/llama/python/ask_llama.py#L4 diff --git a/extensions/llama/python/pyproject.toml b/extensions/llama/python/pyproject.toml index e69de29bb..0d49ad958 100644 --- a/extensions/llama/python/pyproject.toml +++ b/extensions/llama/python/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["setuptools", "wheel"] + +[project] +name = "python-aiconfig-llama" +version = "0.0.1" +authors = [ + { name="Jonathan Lessinger", email="jonathan@lastmileai.dev" }, +] +description = "LLama extension for AIConfig Library" +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", +] +dynamic = ["dependencies"] + +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} + +[project.urls] +"Homepage" = "https://github.com/lastmile-ai/aiconfig" +"Bug Tracker" = "https://github.com/lastmile-ai/aiconfig/issues" + +# Black formatting +[tool.black] +line-length = 99 +include = '\.pyi?$' +exclude = ''' +/( + .eggs # exclude a few common directories in the + | .git # root of the project + | .hg + | .mypy_cache + | .tox + | venv + | _build + | buck-out + | build + | dist + )/ +''' \ No newline at end of file diff --git a/scripts/pypipublish.sh b/scripts/pypipublish.sh new file mode 100755 index 000000000..18fe4205e --- /dev/null +++ b/scripts/pypipublish.sh @@ -0,0 +1,37 @@ +#! /bin/zsh +# pypipublish.sh +# Usage: Run ./scripts/pypipublish.sh path/to/project/root conda-env-name +# path/to/project/root is anywhere with a pyproject.toml. + +# NOTE: This assumes you have the aiconfig conda environment created. +# You will be prompted for a username and password. For the username, use __token__. +# For the password, use the token value, including the pypi- prefix. +# To get a PyPi token, go here: +# Need to get a token from here (scroll down to API Tokens): https://pypi.org/manage/account/ +# If you have issues, read the docs: https://packaging.python.org/en/latest/tutorials/packaging-projects/ + +# If you want to upload to testpypi, run pypipublish-test.sh. + +if [ -z "$2" ] +then + echo "Usage: pypipublish.sh path/to/project/root conda-env-name" + exit 1 +fi + + +cd "$1" +if [ ! -f "pyproject.toml" ] +then + echo "File pyproject.toml does not exist in the current directory" + exit 1 +fi + +rm -rf ./dist + +source /opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh && conda activate "$2"\ + && python3 -m pip install --upgrade build \ + && python3 -m build \ + && python3 -m pip install --upgrade twine \ + && python3 -m twine upload dist/* + +cd - \ No newline at end of file