Skip to content

Commit

Permalink
Included bin/server script
Browse files Browse the repository at this point in the history
  • Loading branch information
toshsan committed Oct 10, 2023
1 parent 738d8a8 commit 41bc0f5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
12 changes: 12 additions & 0 deletions bin/server
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python3

from embedding_server import server

if __name__ == "__main__":
import uvicorn

uvicorn.run(
server.app,
host="0.0.0.0",
port=8080,
)
12 changes: 0 additions & 12 deletions embedding_server/server.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3

import logging
import time
from typing import Optional
Expand Down Expand Up @@ -51,13 +49,3 @@ async def root(body: EmbeddingBody, Authorization: Optional[str] = Header(None))
"object": "list",
"usage": {"prompt_tokens": 0, "total_tokens": 0},
}


if __name__ == "__main__":
import uvicorn

uvicorn.run(
app,
host="0.0.0.0",
port=8080,
)
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

VERSION = "0.0.1"
VERSION = "0.0.2"
DESCRIPTION = "Embedding Server"
LONG_DESCRIPTION = "Drop in replacement for OpenAI's embedding API. Can be used with official OpenAPI libraries"

Expand All @@ -23,9 +23,6 @@
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
],
entry_points={
"console_scripts": [
"embedding-server = embedding_server.server:main",
],
},
package_data={'embedding-server': ['bin/server']},
scripts=['embedding_server/bin/server']
)

0 comments on commit 41bc0f5

Please sign in to comment.