Skip to content

Commit

Permalink
Add endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Nov 18, 2023
1 parent f6b1a08 commit 9febbcb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,12 @@ class EmbeddingResponse(BaseModel):
)
async def embedding(embedding: EmbeddingModel, user=Depends(verify_api_key)):
return LLM(model=embedding.model).embedding(input=embedding.input)


@app.post(
"/v1/engines/{model_name}/embeddings",
tags=["Embeddings"],
dependencies=[Depends(verify_api_key)],
)
async def embedding(embedding: EmbeddingModel, user=Depends(verify_api_key)):
return LLM(model=embedding.model).embedding(input=embedding.input)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="local-llm",
version="0.0.20",
version="0.0.21",
description="Local-LLM is a llama.cpp server in Docker with OpenAI Style Endpoints.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 9febbcb

Please sign in to comment.