Skip to content

Commit

Permalink
move caps to the root
Browse files Browse the repository at this point in the history
Revert "move caps to the root"

This reverts commit b440517.
  • Loading branch information
reymondzzzz committed Nov 7, 2023
1 parent 594b4b0 commit 1184ea3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions self_hosting_machinery/webgui/selfhost_fastapi_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ def __init__(self,
super().__init__(*args, **kwargs)

# API for direct FIM and Chat usage
self.add_api_route("/login", self._login, methods=["GET"])
self.add_api_route("/secret-key-activate", self._secret_key_activate, methods=["GET"])
self.add_api_route("/contrast", self._contrast, methods=["POST"])
self.add_api_route("/chat", self._chat, methods=["POST"])
self.add_api_route("/v1/login", self._login, methods=["GET"])
self.add_api_route("/v1/secret-key-activate", self._secret_key_activate, methods=["GET"])
self.add_api_route("/v1/contrast", self._contrast, methods=["POST"])
self.add_api_route("/v1/chat", self._chat, methods=["POST"])

# API for LSP server
self.add_api_route("/coding_assistant_caps.json", self._coding_assistant_caps, methods=["GET"])
self.add_api_route("/completions", self._completions, methods=["POST"])
self.add_api_route("/v1/completions", self._completions, methods=["POST"])

self._inference_queue = inference_queue
self._id2ticket = id2ticket
Expand All @@ -252,7 +252,7 @@ async def _coding_assistant_caps(self):
code_completion_default_model, _ = completion_resolve_model(self._inference_queue)
return {
"cloud_name": "Refact Self-Hosted",
"endpoint_template": f"{self.prefix}/completions",
"endpoint_template": "v1/completions",
"endpoint_style": "openai",
"telemetry_basic_dest": "",
"running_models": self._inference_queue.models_available(),
Expand Down
1 change: 0 additions & 1 deletion self_hosting_machinery/webgui/webgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def _routers_list(
TabLorasRouter(),
PluginsRouter(),
CompletionsRouter(
prefix="/v1",
id2ticket=id2ticket,
inference_queue=inference_queue,
model_assigner=model_assigner),
Expand Down

0 comments on commit 1184ea3

Please sign in to comment.