Skip to content

Commit

Permalink
more verbose condition for openai startup
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudotensor committed Jun 13, 2024
1 parent 6de8635 commit 86a6a38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion openai_server/server_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def run_server(host: str = '0.0.0.0',
def run(wait=True, **kwargs):
assert 'is_openai_server' in kwargs
name = 'OpenAI' if kwargs['is_openai_server'] else 'Function'
print(kwargs)
if kwargs.get('verbose', False):
print(kwargs)

if kwargs['workers'] > 1 or kwargs['workers'] == 0:
if not kwargs['multiple_workers_gunicorn']:
Expand Down
6 changes: 4 additions & 2 deletions src/gradio_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6093,7 +6093,8 @@ def wrap_embedding_func_api(text, h2ogpt_key1, is_list1, requests_state1):
)

if kwargs['openai_server']:
print("Starting up OpenAI proxy server")
if verbose:
print("Starting up OpenAI proxy server")
if kwargs['openai_workers'] == 1:
from openai_server.server import app as openai_app
else:
Expand All @@ -6103,7 +6104,8 @@ def wrap_embedding_func_api(text, h2ogpt_key1, is_list1, requests_state1):
)

if kwargs['function_server']:
print("Starting up Function server")
if verbose:
print("Starting up Function server")
if kwargs['function_server_workers'] == 1:
from openai_server.function_server import app as function_app
else:
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "b237877bda663c2ee5d762290fa450e9cd15550d"
__version__ = "6de86352d3fb8d4e24a971895a3c33fccb05a3de"

0 comments on commit 86a6a38

Please sign in to comment.