server: tests: add a small check to be sure all started threads have generated response
This commit is contained in:
parent
672d98f6f0
commit
3322bfa980
1 changed files with 1 additions and 1 deletions
|
@ -156,6 +156,7 @@ def step_oai_chat_completions(context):
|
|||
def step_all_prompts_are_predicted(context):
|
||||
for completion_thread in context.completion_threads:
|
||||
completion_thread.join()
|
||||
assert len(context.completions) == len(context.completion_threads)
|
||||
for completion in context.completions:
|
||||
assert_n_tokens_predicted(completion)
|
||||
|
||||
|
@ -251,7 +252,6 @@ def request_completion(context, prompt, n_predict=None, user_api_key=None):
|
|||
assert response.status_code == 401
|
||||
|
||||
|
||||
|
||||
def oai_chat_completions(context, user_prompt, api_error=None):
|
||||
openai.api_key = context.user_api_key
|
||||
openai.api_base = f'{context.base_url}/v1/chat'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue