diff --git a/node/src/remote/index.ts b/node/src/remote/index.ts index fa31c65d..9ef6723f 100644 --- a/node/src/remote/index.ts +++ b/node/src/remote/index.ts @@ -195,6 +195,17 @@ export class RemoteTable implements Table { return this._name } + get schema (): Promise { + return this._client.post(`/v1/table/${this._name}/describe/`).then(res => { + if (res.status !== 200) { + throw new Error(`Server Error, status: ${res.status}, ` + + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions + `message: ${res.statusText}: ${res.data}`) + } + return res.data?.schema + }) + } + search (query: T): Query { return new RemoteQuery(query, this._client, this._name)//, this._embeddings_new) }