Spaces:
Runtime error
Runtime error
:zap: [Enhance] Remove pycrypto requirements, and prettify log
Browse files- Dockerfile +0 -1
- networks/openai_streamer.py +3 -4
- requirements.txt +0 -1
Dockerfile
CHANGED
@@ -2,7 +2,6 @@ FROM python:3.11-slim
|
|
2 |
WORKDIR $HOME/app
|
3 |
COPY requirements.txt $HOME/app
|
4 |
RUN mkdir /.cache && chmod 777 /.cache
|
5 |
-
RUN pip install setuptools wheel
|
6 |
RUN pip install -r requirements.txt
|
7 |
COPY . $HOME/app
|
8 |
EXPOSE 23333
|
|
|
2 |
WORKDIR $HOME/app
|
3 |
COPY requirements.txt $HOME/app
|
4 |
RUN mkdir /.cache && chmod 777 /.cache
|
|
|
5 |
RUN pip install -r requirements.txt
|
6 |
COPY . $HOME/app
|
7 |
EXPOSE 23333
|
networks/openai_streamer.py
CHANGED
@@ -32,10 +32,9 @@ class OpenaiRequester:
|
|
32 |
}
|
33 |
self.requests_headers.update(extra_headers)
|
34 |
|
35 |
-
def log_request(self, url, method="GET"
|
36 |
-
|
37 |
-
|
38 |
-
logger.mesg(f"{url}", end=" ")
|
39 |
|
40 |
def log_response(
|
41 |
self, res: requests.Response, stream=False, iter_lines=False, verbose=False
|
|
|
32 |
}
|
33 |
self.requests_headers.update(extra_headers)
|
34 |
|
35 |
+
def log_request(self, url, method="GET"):
|
36 |
+
logger.note(f"> {method}:", end=" ")
|
37 |
+
logger.mesg(f"{url}", end=" ")
|
|
|
38 |
|
39 |
def log_response(
|
40 |
self, res: requests.Response, stream=False, iter_lines=False, verbose=False
|
requirements.txt
CHANGED
@@ -5,7 +5,6 @@ httpx
|
|
5 |
jinja2
|
6 |
markdown2[all]
|
7 |
openai
|
8 |
-
pycrypto
|
9 |
pydantic
|
10 |
requests
|
11 |
sse_starlette
|
|
|
5 |
jinja2
|
6 |
markdown2[all]
|
7 |
openai
|
|
|
8 |
pydantic
|
9 |
requests
|
10 |
sse_starlette
|