-
Notifications
You must be signed in to change notification settings - Fork 2
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
File caching #50
base: main
Are you sure you want to change the base?
File caching #50
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test fails.
Fix the env import.
Rename integration test or mock API calls
async def test_cache(self): | ||
adapter = OpenAIAdapter(message_with_citation) | ||
await adapter.main() | ||
self.assertIn("file-A8iZLTqbU5cxrNOWfe4gd404", adapter.files_cache) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work, unless you have the same key. Use TEST_FILE_ID in the env.
Update line 11: load_dotenv('../.env', override=True)
.
@@ -88,3 +88,8 @@ def test_has_annotations(self): | |||
|
|||
result = OpenAIAdapter(message_with_citation).has_annotations() | |||
self.assertTrue(result) | |||
|
|||
async def test_cache(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests that aren't mocked should be named test_cache_integration
. otherwise mock the API client call. See test_on_chat_resume_logic for a way to do this.
No description provided.