Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const JigsawStack = (config?: BaseConfig) => {
prediction: general.prediction,
text_to_sql: general.text_to_sql,
embedding: general.embedding,
embeddingV2: general.embeddingV2,
embedding_v2: general.embedding_v2,
audio,
vision: {
vocr: createBoundMethod(vision, vision.vocr),
Expand Down
8 changes: 4 additions & 4 deletions src/general/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class General {
this.client = client;
this.summary = this.summary.bind(this);
this.embedding = this.embedding.bind(this);
this.embeddingV2 = this.embeddingV2.bind(this);
this.embedding_v2 = this.embedding_v2.bind(this);
}

translate = {
Expand Down Expand Up @@ -88,9 +88,9 @@ class General {
return await this.client.fetchJSS("/v1/embedding", "POST", params);
}

embeddingV2(params: EmbeddingV2Params): Promise<EmbeddingV2Response>;
embeddingV2(file: Blob | Buffer, params: Omit<EmbeddingV2Params, "url" | "file_store_key" | "file_content">): Promise<EmbeddingV2Response>;
async embeddingV2(params: EmbeddingV2Params | Blob | Buffer, options?: EmbeddingV2Params): Promise<EmbeddingV2Response> {
embedding_v2(params: EmbeddingV2Params): Promise<EmbeddingV2Response>;
embedding_v2(file: Blob | Buffer, params: Omit<EmbeddingV2Params, "url" | "file_store_key" | "file_content">): Promise<EmbeddingV2Response>;
async embedding_v2(params: EmbeddingV2Params | Blob | Buffer, options?: EmbeddingV2Params): Promise<EmbeddingV2Response> {
if (params instanceof Blob || params instanceof Buffer) {
const formData = createFileUploadFormData(params, options);
return await this.client.fetchJSS("/v2/embedding", "POST", formData);
Expand Down