MCPcopy Create free account
hub / github.com/alibaba/zvec / test_extra_params

Method test_extra_params

python/tests/test_embedding.py:569–584  ·  view source on GitHub ↗

Test extra_params property.

(self)

Source from the content-addressed store, hash-verified

567 assert embedding_func.model == "text-embedding-ada-002"
568
569 def test_extra_params(self):
570 """Test extra_params property."""
571 # Test without extra params
572 embedding_func = OpenAIDenseEmbedding(api_key="sk-test")
573 assert embedding_func.extra_params == {}
574
575 # Test with extra params
576 embedding_func = OpenAIDenseEmbedding(
577 api_key="sk-test",
578 encoding_format="float",
579 user="test-user",
580 )
581 assert embedding_func.extra_params == {
582 "encoding_format": "float",
583 "user": "test-user",
584 }
585
586 @patch("zvec.extension.openai_function.require_module")
587 def test_embed_with_empty_text(self, mock_require_module):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected