microsoft / microsoft/semantic-kernel-java
Java: API - What about manipulating an array of float in Embedding ?
オープン
まだ誰も着手していません。
java
- 主要言語
- Java
- スター
- 276
- フォーク
- 56
- 平均マージ
- 17時間 45分
- マージ済み PR(30日)
- 4
説明
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 ?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず Embedding クラスと、既存のコンストラクターおよび getVector API を見つけます。ベクトルが現在どのように保存されているかと、近くにあるテストを確認し、その後、提案された配列ベースの構築と取得によって期待される値が維持されること、および API の動作がカバーされていることを検証してから、機能が完成したと判断します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- api
- issue の種類
- 機能追加
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100