* replace get_task method and change invocation layer order
* add test for invocation layer order
* add test documentation
* make invocation layer test more robust
* fix type annotation
* change hf timeout
* simplify timeout mock and add get_task exception cause
---------
Co-authored-by: Stefano Fiorucci <44616784+anakin87@users.noreply.github.com>
* Add unit test mark for appropriate tests
* Remove deepset Cloud specific tests
* Create pytest fixtures
* Reduce number of checks run for test_match_context_multi_process and test_match_context_single_process
* Increase speed of test_match_contexts_multi_process
* Revert "Remove deepset Cloud specific tests"
This reverts commit b65173665f3e873f17f3613c5fd4fa3174a6d71b.
* Continuing revert commit
* Remove unnecessary comment
* Break down bigger test into smaller tests
* Use urlparse to get file extension for urls that contain text after the file extension such as query parameters
* Run pre-commit to fix format
* Reformat import_utils
* Document get_filename_extension_from_url
* Formatting
* Formatting
* Update haystack/utils/import_utils.py
Co-authored-by: Stefano Fiorucci <44616784+anakin87@users.noreply.github.com>
* Update haystack/utils/import_utils.py
Co-authored-by: Stefano Fiorucci <44616784+anakin87@users.noreply.github.com>
---------
Co-authored-by: Stefano Fiorucci <44616784+anakin87@users.noreply.github.com>
* make a package
* Update haystack/document_stores/elasticsearch/es7.py
Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>
* do not expose ES types from the package
---------
Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>
* Create SageMaker base class and two implementation subclasses
---------
Co-authored-by: Stefano Fiorucci <44616784+anakin87@users.noreply.github.com>
* adding unit tests for sentence transformers ranker
* Adding more unit tests
* Remove empty line
* Undo static method
* Revert change
* Updated indentation and added match message
* Remove unneeded paranthesis
* Add support for prompt truncation when using chatgpt if direct prompting is used
* Update tests for test token limit for prompt node
* Update warning message to be correct
* Minor cleanup
* Mark back to integration
* Update count_openai_tokens_messages to reflect changes shown in tiktoken
* Use mocking to avoid request call
* Fix test to make it comply with unit test requirements
* Move tests to respective invocation layers
* Moved fixture to one spot
* #4071 implemented optional content moderation for OpenAI PromptNode
* added two simple integration tests
* improved documentation & renamed _invoke method to _execute_openai_request
* added a flag to check_openai_policy_violation that will return a full dict of all text violations and their categories
* re-implemented the tests as unit tests & without use of the OpenAI APIs
* removed unused patch
* changed check_openai_policy_violation back to only return a bool
* fixed pylint and test error
---------
Co-authored-by: Julian Risch <julian.risch@deepset.ai>
* #4653 fix changing scores by returning new document objects from document store queries
* added integration test for InMemoryDocumentStore demonstrating the desired behavior
* Update test/document_stores/test_memory.py
* Simplify HFLocalInvocationLayer, move/add unit tests
* PR feedback
* Better pipeline invocation, add mocked tests
* Minor improvements
* Mock pipeline directly, unit test updates
* PR feedback, change pytest type to integration
* Mock supports unit test
* add full stop
* PR feedback, improve unit tests
* Add mock_get_task fixture
* Further improve unit tests
* Minor unit test improvement
* Add unit tests, increase coverage
* Add unit tests, increase test coverage
* Small optimization, improve _ensure_token_limit unit test
---------
Co-authored-by: Darja Fokina <daria.f93@gmail.com>