Spaces:
Runtime error
Runtime error
Commit
·
145578f
1
Parent(s):
43e6d56
fixed base_url issue
Browse files- main/api.py +1 -1
- main/config.yaml +1 -1
main/api.py
CHANGED
|
@@ -63,7 +63,7 @@ class InferenceApi(LitAPI):
|
|
| 63 |
stream: bool = False
|
| 64 |
) -> Any:
|
| 65 |
"""Make an authenticated request to the LLM Server."""
|
| 66 |
-
base_url = self.llm_config.get('
|
| 67 |
full_endpoint = f"{base_url.rstrip('/')}/{self._get_endpoint(endpoint).lstrip('/')}"
|
| 68 |
|
| 69 |
try:
|
|
|
|
| 63 |
stream: bool = False
|
| 64 |
) -> Any:
|
| 65 |
"""Make an authenticated request to the LLM Server."""
|
| 66 |
+
base_url = self.llm_config.get('host', 'http://localhost:8002')
|
| 67 |
full_endpoint = f"{base_url.rstrip('/')}/{self._get_endpoint(endpoint).lstrip('/')}"
|
| 68 |
|
| 69 |
try:
|
main/config.yaml
CHANGED
|
@@ -6,7 +6,7 @@ server:
|
|
| 6 |
|
| 7 |
llm_server:
|
| 8 |
host: "teamgenki-llmserver.hf.space"
|
| 9 |
-
port:
|
| 10 |
timeout: 60.0
|
| 11 |
api_prefix: "/api/v1" # This will be used for route prefixing
|
| 12 |
endpoints:
|
|
|
|
| 6 |
|
| 7 |
llm_server:
|
| 8 |
host: "teamgenki-llmserver.hf.space"
|
| 9 |
+
port: 7860 # Will be ignored for hf.space URLs
|
| 10 |
timeout: 60.0
|
| 11 |
api_prefix: "/api/v1" # This will be used for route prefixing
|
| 12 |
endpoints:
|