Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve and add more tests #807

Merged
merged 4 commits into from
Oct 17, 2023

Conversation

sidmohanty11
Copy link
Contributor

Description

This PR fixes Open AI LLM for streaming and adds more tests

@codecov
Copy link

codecov bot commented Oct 15, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
embedchain/llm/openai.py 100.00% <100.00%> (+46.42%) ⬆️

... and 9 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

pyproject.toml Outdated
@@ -120,6 +120,7 @@ ftfy = { version = "6.1.1", optional = true }
regex = { version = "2023.8.8", optional = true }
huggingface_hub = { version = "^0.17.3", optional = true }
pymilvus = "2.3.1"
pytest-asyncio = "^0.21.1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be part of the dev dependencies.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I am not sure if we really need this package btw.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deshraj thank you, I've added it to dev dependency. It's actually needed by a test for the Poe bot, which uses async code that's not currently running and is being skipped.

assert answer == "Test answer"
mock_llm_instance.assert_called_once_with("Test query")
mock_llm_instance.assert_called_once_with("Test query")
mock_llm_instance.assert_called_once_with("Test query")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to call this three times? I am a bit confused here 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the miss, yup you're right! I've removed it :)

@deshraj deshraj merged commit e8a2846 into mem0ai:main Oct 17, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants