Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
HamaWhiteGG committed Jul 7, 2023
1 parent 7206dea commit 3b6587b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ private Pinecone createPinecone() {
*/
private void ensureIndexCreated() {
if (!client.listIndexes().contains(INDEX_NAME)) {
// the text-embedding-ada-002 model has an output dimension of 1536.
var request = CreateIndexRequest.builder()
.name(INDEX_NAME)
.dimension(1536)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public static void main(String[] args) {
*/
private static void createPineconeIndex(PineconeClient client) {
if (!client.listIndexes().contains(INDEX_NAME)) {
// the text-embedding-ada-002 model has an output dimension of 1536.
var request = CreateIndexRequest.builder()
.name(INDEX_NAME)
.dimension(1536)
Expand Down

0 comments on commit 3b6587b

Please sign in to comment.