Skip to content

Commit faf6bca

Browse files
committed
Remove models implementation from llama-cpp
Signed-off-by: Juan Antonio Osorio <[email protected]>
1 parent d53564c commit faf6bca

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

src/codegate/providers/llamacpp/provider.py

+2-18
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,8 @@ def provider_route_name(self) -> str:
2929
return "llamacpp"
3030

3131
def models(self, endpoint: str = None, api_key: str = None) -> List[str]:
32-
headers = {}
33-
if api_key:
34-
headers["Authorization"] = f"Bearer {api_key}"
35-
if not endpoint:
36-
endpoint = self.base_url
37-
38-
# HACK: This is using OpenAI's /v1/models endpoint to get the list of models
39-
resp = httpx.get(
40-
f"{endpoint}/v1/models",
41-
headers=headers,
42-
)
43-
44-
if resp.status_code != 200:
45-
raise ModelFetchError(f"Failed to fetch models from Llama API: {resp.text}")
46-
47-
jsonresp = resp.json()
48-
49-
return [model["id"] for model in jsonresp.get("data", [])]
32+
# TODO: Implement file fetching
33+
return []
5034

5135
def _setup_routes(self):
5236
"""

0 commit comments

Comments
 (0)