weiqingy opened a new pull request, #686:
URL: https://github.com/apache/flink-agents/pull/686

   `test_ollama_embedding_setup` and `test_openai_embedding_model` both 
construct a `BaseEmbeddingModelSetup` subclass with `connection` set to a 
resource-name string, then call `setup.embed(...)` directly without first 
invoking `setup.open()`.
   
   `BaseEmbeddingModelSetup.open()` is what resolves `self.connection` from the 
descriptor-supplied resource name into the actual 
`BaseEmbeddingModelConnection` instance. Without it, `_get_connection()` raises 
`TypeError("Expect BaseEmbeddingModelConnection, but is str")` and the test 
fails. The Ollama test exhibits this failure in CI on Python 3.10 once the 
ollama daemon is brought up by `start_ollama_server.sh`; the OpenAI test is 
masked by the `TEST_API_KEY` skipif but would fail identically if the gate were 
ever satisfied. `test_tongyi_embedding_model` (the third embedding test in this 
repo) already follows the correct pattern.
   
   Add the missing `setup.open()` call to both tests so the connection is 
resolved before `embed()`.
   
   ### Documentation
   
   <!-- Do not remove this section. Check the proper box only. -->
   
   - [ ] `doc-needed` <!-- Your PR changes impact docs -->
   - [X] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-included` <!-- Your PR already contains the necessary 
documentation updates -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to