Skip to content

Commit

Permalink
Allow async
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudotensor committed Nov 1, 2024
1 parent 89d4051 commit 86e631d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/gpt_langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -3349,7 +3349,7 @@ def get_llm(use_openai_model=False,
else:
# for vllm 0.6.3+
kwargs_extra.update(dict(response_format=dict(type='text')))
async_output = False # https://github.com/h2oai/h2ogpt/issues/928
# async_output = False # https://github.com/h2oai/h2ogpt/issues/928
# async_sem = asyncio.Semaphore(num_async) if async_output else NullContext()
kwargs_extra.update(dict(openai_api_key=api_key,
# batch_size=1,
Expand Down Expand Up @@ -3409,7 +3409,7 @@ def get_llm(use_openai_model=False,
user_prompt_for_fake_system_prompt=user_prompt_for_fake_system_prompt,
openai_api_base=base_url,
openai_api_key=api_key,
batch_size=1, # https://github.com/h2oai/h2ogpt/issues/928
batch_size=num_async if async_output else 1,
client=openai_client_completions,
async_client=openai_async_client_completions,
async_sem=async_sem,
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1f0a8f36fd8a811958eef2c671bc343d77a187fb"
__version__ = "89d4051e6818a70033874c920eb5087d7c7c81dc"

0 comments on commit 86e631d

Please sign in to comment.