trieve icon indicating copy to clipboard operation
trieve copied to clipboard

feature: api client package

Open drew-harris opened this issue 1 year ago • 2 comments

Please indicate what issue this PR is related to and @ any maintainers who are relevant

drew-harris avatar Aug 06 '24 22:08 drew-harris

Fields are now renamed so that

const test = await trieve.fetch("/api/chunk", "post", {
  datasetId: "c65a2dd7-298e-48e6-ac90-e336ccbbe74f",
  trDataset: "c65a2dd7-298e-48e6-ac90-e336ccbbe74f",
  requestBody: {
    chunk_html: "hello"
  }
});

becomes just

const test = await trieve.fetch("/api/chunk", "post", {
  datasetId: "c65a2dd7-298e-48e6-ac90-e336ccbbe74f",
  data: {
    chunk_html: "hello"
  }
});

drew-harris avatar Aug 07 '24 17:08 drew-harris

Same for organization id

drew-harris avatar Aug 07 '24 17:08 drew-harris