From pipeline > config > UI. Provide example project for promptui - Pipeline to config: `kotaemon.contribs.promptui.config.export_pipeline_to_config`. The config follows schema specified in this document: https://cinnamon-ai.atlassian.net/wiki/spaces/ATM/pages/2748711193/Technical+Detail. Note: this implementation exclude the logs, which will be handled in AUR-408. - Config to UI: `kotaemon.contribs.promptui.build_from_yaml` - Example project is located at `examples/promptui/`
62 lines
1.6 KiB
Python
62 lines
1.6 KiB
Python
import codecs
|
|
import re
|
|
from pathlib import Path
|
|
|
|
import setuptools
|
|
|
|
|
|
def read(file_path: str) -> str:
|
|
return codecs.open(file_path, "r").read()
|
|
|
|
|
|
def get_version() -> str:
|
|
version_file = read(str(Path("kotaemon", "__init__.py")))
|
|
match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
|
|
if match:
|
|
return match.group(1)
|
|
raise RuntimeError("Cannot find verison string")
|
|
|
|
|
|
setuptools.setup(
|
|
name="kotaemon",
|
|
version=get_version(),
|
|
author="john",
|
|
author_email="john@cinnamon.com",
|
|
description="Kotaemon core library for AI development",
|
|
long_description=read("README.md"),
|
|
long_description_content_type="text/markdown",
|
|
url="https://github.com/Cinnamon/kotaemon/",
|
|
packages=setuptools.find_packages(exclude=("tests", "tests.*")),
|
|
install_requires=[
|
|
"farm-haystack==1.19.0",
|
|
"langchain",
|
|
"theflow",
|
|
"llama-index",
|
|
"llama-hub",
|
|
"nltk",
|
|
"gradio",
|
|
],
|
|
extras_require={
|
|
"dev": [
|
|
"ipython",
|
|
"pytest",
|
|
"pre-commit",
|
|
"black",
|
|
"flake8",
|
|
"sphinx",
|
|
"coverage",
|
|
# optional dependency needed for test
|
|
"openai",
|
|
"chromadb",
|
|
],
|
|
},
|
|
entry_points={"console_scripts": ["kh=kotaemon.cli:main"]},
|
|
python_requires=">=3",
|
|
classifiers=[
|
|
"Programming Language :: Python :: 3",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Operating System :: OS Independent",
|
|
],
|
|
include_package_data=True,
|
|
)
|