Java: API - What about manipulating an array of float in Embedding ?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
Research direction
Start by locating the Embedding class and its existing constructor and getVector API. Review how vectors are currently stored and any nearby tests, then verify the proposed array-based construction and retrieval preserve the expected values and that the API behavior is covered before considering the feature complete.
Written by the indexing model from the issue text.
Description
The Embedding contains a List<Float> to represent the vector. You can pass this list to the constructor and get its content as a List
private final List<Float> vector;
public Embedding(@Nonnull List<Float> vector) {
Objects.requireNonNull(vector);
this.vector = Collections.unmodifiableList(vector);
}
public List<Float> getVector() {
return vector;
}
But there are several external APIs (such as PGVector for example) that manipulate arrays of floats. So we end up casting arrays to lists back and forth.
It would be handy if Embedding had a constructor that takes an array of float, and a method to return the vector as an array:
public Embedding(float[] vector);
public float[] toArray();
WDYT ?
- Dominant language
- Java
- Stars
- 276
- Forks
- 56
- Avg merge
- 17h 45m
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/semantic-kernel-java
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
microsoft/semantic-kernel-java#334 · 1 comment ·
-
Feature Parity Inquiry: Multi-Agent Orchestration and Roadmap Alignment with Python/.NET Versions Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/semantic-kernel-java#331 · 7 comments ·
-
bug triage
microsoft/semantic-kernel-java#330 · 3 comments · 1 assignee ·
-
bug triage
Difficulty 5/5 Over a week Newbie friendliness 20/100
microsoft/semantic-kernel-java#328 · 1 comment ·
-
microsoft/semantic-kernel-java#323 · 1 reaction · 2 assignees ·
All issues in microsoft/semantic-kernel-java
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100