mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-07-24 17:30:38 +00:00
test: OpenAIChatGenerator - fix flaky test (#9075)
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
This commit is contained in:
parent
f3fc6894fd
commit
67ab3788ea
@ -886,7 +886,7 @@ class TestOpenAIChatGenerator:
|
|||||||
|
|
||||||
# check that the completion_start_time is set and valid ISO format
|
# check that the completion_start_time is set and valid ISO format
|
||||||
assert "completion_start_time" in message.meta
|
assert "completion_start_time" in message.meta
|
||||||
assert datetime.fromisoformat(message.meta["completion_start_time"]) < datetime.now()
|
assert datetime.fromisoformat(message.meta["completion_start_time"]) <= datetime.now()
|
||||||
|
|
||||||
assert isinstance(message.meta["usage"], dict)
|
assert isinstance(message.meta["usage"], dict)
|
||||||
assert message.meta["usage"]["prompt_tokens"] > 0
|
assert message.meta["usage"]["prompt_tokens"] > 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user