mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-16 10:02:30 +03:00
13e9fc490b
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
20 lines
526 B
Python
20 lines
526 B
Python
import pytest
|
|
|
|
from quivr_core import ChatLLM
|
|
|
|
|
|
@pytest.mark.base
|
|
def test_chat_llm(fake_llm):
|
|
chat_llm = ChatLLM(
|
|
llm=fake_llm,
|
|
)
|
|
answer = chat_llm.answer("Hello, how are you?")
|
|
|
|
assert len(answer.answer) > 0
|
|
assert answer.metadata is not None
|
|
assert answer.metadata.citations is None
|
|
assert answer.metadata.followup_questions is None
|
|
assert answer.metadata.sources == []
|
|
assert answer.metadata.metadata_model is not None
|
|
assert answer.metadata.metadata_model.name is not None
|