-
-
Notifications
You must be signed in to change notification settings - Fork 407
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Basic checks
- I searched existing issues - this hasn't been reported
- I can reproduce this consistently
- This is a RubyLLM bug, not my application code
What's broken?
The RubyLLM.embed method returns different data structures depending on the number of inputs, making it difficult to handle dynamic use cases.
Current behavior:
- RubyLLM.embed(["string1", "string2"]) returns an Embedding object with vectors as an array of arrays:
[[vector1], [vector2]] - RubyLLM.embed(["string1"]) returns an Embedding object with vectors as a single array: [vector1]
How to reproduce
RubyLLM.embed(["foo", "bar"]) -> [[vector], [vector]]
RubyLLM.embed(["foo"]) -> [vector]
Expected behavior
The return format should be consistent regardless of input count. Single inputs should return [[vector]] to match the multi-input format.
What actually happened
It returns [vector].
Environment
RubyLLM 1.3.1.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working