Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- src/chattr/__init__.py +2 -2
- src/chattr/gui.py +1 -3
src/chattr/__init__.py
CHANGED
|
@@ -9,7 +9,7 @@ from requests import get
|
|
| 9 |
load_dotenv()
|
| 10 |
|
| 11 |
SERVER_URL: str = getenv(key="SERVER_URL", default="127.0.0.1")
|
| 12 |
-
SERVER_PORT: int = getenv(key="SERVER_PORT", default=7860)
|
| 13 |
CURRENT_DATE: str = datetime.now().strftime(format="%Y-%m-%d_%H-%M-%S")
|
| 14 |
MCP_VOICE_GENERATOR: str = getenv(
|
| 15 |
key="MCP_VOICE_GENERATOR", default="http://localhost:8001/"
|
|
@@ -47,7 +47,7 @@ LOG_DIR.mkdir(exist_ok=True)
|
|
| 47 |
|
| 48 |
MODEL_URL: str = (
|
| 49 |
DOCKER_MODEL_RUNNER_URL
|
| 50 |
-
if get(DOCKER_MODEL_RUNNER_URL, timeout=
|
| 51 |
else GROQ_URL
|
| 52 |
)
|
| 53 |
MODEL_NAME: str = (
|
|
|
|
| 9 |
load_dotenv()
|
| 10 |
|
| 11 |
SERVER_URL: str = getenv(key="SERVER_URL", default="127.0.0.1")
|
| 12 |
+
SERVER_PORT: int = int(getenv(key="SERVER_PORT", default="7860"))
|
| 13 |
CURRENT_DATE: str = datetime.now().strftime(format="%Y-%m-%d_%H-%M-%S")
|
| 14 |
MCP_VOICE_GENERATOR: str = getenv(
|
| 15 |
key="MCP_VOICE_GENERATOR", default="http://localhost:8001/"
|
|
|
|
| 47 |
|
| 48 |
MODEL_URL: str = (
|
| 49 |
DOCKER_MODEL_RUNNER_URL
|
| 50 |
+
if get(DOCKER_MODEL_RUNNER_URL, timeout=10).status_code == 200
|
| 51 |
else GROQ_URL
|
| 52 |
)
|
| 53 |
MODEL_NAME: str = (
|
src/chattr/gui.py
CHANGED
|
@@ -17,9 +17,7 @@ def generate_response(history: list[ChatMessage], thread_id: str) -> list[ChatMe
|
|
| 17 |
ChatMessage(
|
| 18 |
role="assistant",
|
| 19 |
content=f"Here is the plot of quarterly sales for {thread_id}.",
|
| 20 |
-
metadata={
|
| 21 |
-
"title": "🛠️ Used tool Weather API",
|
| 22 |
-
},
|
| 23 |
)
|
| 24 |
)
|
| 25 |
return history
|
|
|
|
| 17 |
ChatMessage(
|
| 18 |
role="assistant",
|
| 19 |
content=f"Here is the plot of quarterly sales for {thread_id}.",
|
| 20 |
+
metadata={"title": "🛠️ Used tool Weather API"},
|
|
|
|
|
|
|
| 21 |
)
|
| 22 |
)
|
| 23 |
return history
|