@singlestore/elegance-sdk
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -91,2 +91,3 @@ import * as react from 'react'; | ||
where?: MySQLWhere; | ||
extra?: string; | ||
}>; | ||
@@ -102,2 +103,3 @@ type FindManyResult<T extends any[] = any[]> = T; | ||
limit?: number; | ||
extra?: string; | ||
}>; | ||
@@ -107,10 +109,13 @@ type CreateEmbeddingBody = { | ||
}; | ||
type VectorSearchResult = any[]; | ||
type VectorSearchBody = WithDb<{ | ||
query: string; | ||
embeddingField: string; | ||
limit?: number; | ||
minSimilarity?: number; | ||
includeEmbedding?: boolean; | ||
}>; | ||
type CreateFileEmbeddingsResult = { | ||
text: string; | ||
embedding: Embedding; | ||
}[]; | ||
type CreateFileEmbeddingsBody = { | ||
dataURL: string; | ||
textField?: string; | ||
embeddingField?: string; | ||
chunkSize?: number; | ||
}; | ||
type CreateAndInsertFileEmbeddingsBody = WithDb<CreateFileEmbeddingsBody>; | ||
type CreateChatCompletionBody = CreateChatCompletionArgs[0]; | ||
@@ -128,13 +133,10 @@ type SearchChatCompletionResult = { | ||
} & Omit<CreateChatCompletionBody, "prompt">>; | ||
type CreateFileEmbeddingsResult = { | ||
text: string; | ||
embedding: Embedding; | ||
}[]; | ||
type CreateFileEmbeddingsBody = { | ||
dataURL: string; | ||
textField?: string; | ||
embeddingField?: string; | ||
chunkSize?: number; | ||
}; | ||
type CreateAndInsertFileEmbeddingsBody = WithDb<CreateFileEmbeddingsBody>; | ||
type VectorSearchResult = any[]; | ||
type VectorSearchBody = WithDb<{ | ||
query: string; | ||
embeddingField: string; | ||
limit?: number; | ||
minSimilarity?: number; | ||
includeEmbedding?: boolean; | ||
}>; | ||
@@ -141,0 +143,0 @@ type DefaultError = { |
{ | ||
"name": "@singlestore/elegance-sdk", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -352,2 +352,3 @@ # SingleStore Elegance SDK | ||
where?: MySQLWhere; | ||
extra?: string; | ||
} | ||
@@ -384,2 +385,3 @@ ``` | ||
limit?: number; | ||
extra?: string; | ||
} | ||
@@ -386,0 +388,0 @@ ``` |
@@ -125,2 +125,3 @@ import { ClientOptions } from 'openai'; | ||
where?: MySQLWhere; | ||
extra?: string; | ||
}>; | ||
@@ -136,2 +137,3 @@ type FindManyResult<T extends any[] = any[]> = T; | ||
limit?: number; | ||
extra?: string; | ||
}>; | ||
@@ -141,10 +143,13 @@ type CreateEmbeddingBody = { | ||
}; | ||
type VectorSearchResult = any[]; | ||
type VectorSearchBody = WithDb<{ | ||
query: string; | ||
embeddingField: string; | ||
limit?: number; | ||
minSimilarity?: number; | ||
includeEmbedding?: boolean; | ||
}>; | ||
type CreateFileEmbeddingsResult = { | ||
text: string; | ||
embedding: Embedding; | ||
}[]; | ||
type CreateFileEmbeddingsBody = { | ||
dataURL: string; | ||
textField?: string; | ||
embeddingField?: string; | ||
chunkSize?: number; | ||
}; | ||
type CreateAndInsertFileEmbeddingsBody = WithDb<CreateFileEmbeddingsBody>; | ||
type CreateChatCompletionBody = CreateChatCompletionArgs[0]; | ||
@@ -162,13 +167,10 @@ type SearchChatCompletionResult = { | ||
} & Omit<CreateChatCompletionBody, "prompt">>; | ||
type CreateFileEmbeddingsResult = { | ||
text: string; | ||
embedding: Embedding; | ||
}[]; | ||
type CreateFileEmbeddingsBody = { | ||
dataURL: string; | ||
textField?: string; | ||
embeddingField?: string; | ||
chunkSize?: number; | ||
}; | ||
type CreateAndInsertFileEmbeddingsBody = WithDb<CreateFileEmbeddingsBody>; | ||
type VectorSearchResult = any[]; | ||
type VectorSearchBody = WithDb<{ | ||
query: string; | ||
embeddingField: string; | ||
limit?: number; | ||
minSimilarity?: number; | ||
includeEmbedding?: boolean; | ||
}>; | ||
@@ -175,0 +177,0 @@ declare function embeddingToBuffer(embedding: Embedding): Buffer; |
@@ -212,3 +212,3 @@ 'use strict'; | ||
} else { | ||
const { columns, where, skip, limit } = body; | ||
const { columns, where, skip, limit, extra } = body; | ||
const tablePath = connection.tablePath(collection, db); | ||
@@ -228,2 +228,4 @@ let query = `SELECT`; | ||
query += ` OFFSET ${skip}`; | ||
if (extra) | ||
query += ` ${extra}`; | ||
result = (yield connection.execute(query))[0]; | ||
@@ -249,3 +251,3 @@ } | ||
} else { | ||
const { columns, where } = body; | ||
const { columns, where, extra } = body; | ||
const tablePath = connection.tablePath(collection, db); | ||
@@ -262,2 +264,4 @@ let query = `SELECT`; | ||
query += ` LIMIT 1`; | ||
if (extra) | ||
query += ` ${extra}`; | ||
result = (_b = (_a = yield connection.execute(query)) == null ? void 0 : _a[0]) == null ? void 0 : _b[0]; | ||
@@ -264,0 +268,0 @@ } |
@@ -126,2 +126,3 @@ import { ClientOptions } from 'openai'; | ||
where?: MySQLWhere; | ||
extra?: string; | ||
}>; | ||
@@ -137,2 +138,3 @@ type FindManyResult<T extends any[] = any[]> = T; | ||
limit?: number; | ||
extra?: string; | ||
}>; | ||
@@ -142,10 +144,14 @@ type CreateEmbeddingBody = { | ||
}; | ||
type VectorSearchResult = any[]; | ||
type VectorSearchBody = WithDb<{ | ||
query: string; | ||
embeddingField: string; | ||
limit?: number; | ||
minSimilarity?: number; | ||
includeEmbedding?: boolean; | ||
}>; | ||
type CreateFileEmbeddingsResult = { | ||
text: string; | ||
embedding: Embedding; | ||
}[]; | ||
type CreateFileEmbeddingsBody = { | ||
dataURL: string; | ||
textField?: string; | ||
embeddingField?: string; | ||
chunkSize?: number; | ||
}; | ||
type CreateAndInsertFileEmbeddingsResult = CreateFileEmbeddingsResult; | ||
type CreateAndInsertFileEmbeddingsBody = WithDb<CreateFileEmbeddingsBody>; | ||
type CreateChatCompletionBody = CreateChatCompletionArgs[0]; | ||
@@ -163,14 +169,10 @@ type SearchChatCompletionResult = { | ||
} & Omit<CreateChatCompletionBody, "prompt">>; | ||
type CreateFileEmbeddingsResult = { | ||
text: string; | ||
embedding: Embedding; | ||
}[]; | ||
type CreateFileEmbeddingsBody = { | ||
dataURL: string; | ||
textField?: string; | ||
embeddingField?: string; | ||
chunkSize?: number; | ||
}; | ||
type CreateAndInsertFileEmbeddingsResult = CreateFileEmbeddingsResult; | ||
type CreateAndInsertFileEmbeddingsBody = WithDb<CreateFileEmbeddingsBody>; | ||
type VectorSearchResult = any[]; | ||
type VectorSearchBody = WithDb<{ | ||
query: string; | ||
embeddingField: string; | ||
limit?: number; | ||
minSimilarity?: number; | ||
includeEmbedding?: boolean; | ||
}>; | ||
@@ -177,0 +179,0 @@ type DefaultError = { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121080
2700
657