Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to hatchling, upgrade deps #214

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backend/openui/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def is_running_in_docker():
"openui.server:app",
host="0.0.0.0" if is_running_in_docker() else "127.0.0.1",
log_config=str(config_file) if ui else None,
port=7878,
port=config.PORT,
reload=reload,
)
)
Expand All @@ -90,7 +90,7 @@ def is_running_in_docker():
f"Starting LiteLLM in the background with config: {config_path}"
)
litellm_process = subprocess.Popen(
["litellm", "--config", config_path],
["litellm", "--config", config_path, "--port", "4000"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
Expand All @@ -111,7 +111,7 @@ def is_running_in_docker():
uvicorn.run(
"openui.server:app",
host="0.0.0.0" if is_running_in_docker() else "127.0.0.1",
port=7878,
port=config.PORT,
reload=reload,
)
else:
Expand Down
1 change: 1 addition & 0 deletions backend/openui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ class Env(Enum):
GROQ_API_KEY = os.getenv("GROQ_API_KEY")
LITELLM_API_KEY = os.getenv("LITELLM_API_KEY", os.getenv("LITELLM_MASTER_KEY"))
LITELLM_BASE_URL = os.getenv("LITELLM_BASE_URL", "http://0.0.0.0:4000")
PORT = int(os.getenv("PORT", 7878))
16 changes: 11 additions & 5 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,28 @@ dependencies = [
"uvicorn>=0.22.0",
"fastapi-sso>=0.10.0",
"boto3>=1.34.67",
"tiktoken>=0.8.0",
]
name = "openui"
version = "0.4.0"
description = "A backend service for generating HTML components with LLM's"
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [{ name = "Chris Van Pelt" }]
license = { text = "Apache-2.0" }
classifiers = ["License :: OSI Approved :: Apache Software License"]

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.setuptools]
packages = ["openui", "openui.util"]
[tool.hatch.build]
include = ["openui/**/*.py", "openui/*.yaml", "openui/*.ascii", "openui/assets/*", "openui/dist/*"]
exclude = [
"openui/eval/components/*",
"openui/eval/datasets/*",
"openui/eval/wandb/*"
]

[project.urls]
Homepage = "https://github.com/wandb/openui"
Expand Down
Loading
Loading