Skip to content

Commit

Permalink
add gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
SaraVieira authored and skeptrunedev committed Aug 31, 2024
1 parent f928fcc commit 74e736d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 314 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/component-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Search component test suite

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

on:
pull_request:
paths:
- "clients/search-component/**"

jobs:
build-test:
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Running tests
run: yarn build --filter trieve-search-component
tests:
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Running lint
working-directory: ./clients/search-component
run: yarn lint
297 changes: 0 additions & 297 deletions clients/search-component/README copy.md

This file was deleted.

23 changes: 6 additions & 17 deletions clients/search-component/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
A Typescript based SDK that allows you to communicate with the Trieve API
## Trieve Search Component

The easiest way to get up and running in your app using trieve search.

## How to use

Install using your favorite package manager:

```
yarn add trieve-ts-sdk
yarn add trieve-search-component
# or
npm install trieve-ts-sdk
npm install trieve-search-component
# or
pnpm install trieve-ts-sdk
pnpm install trieve-search-component
```

After installing the first step is to instantiate a new `TrieveSDK` like so:
Expand All @@ -23,19 +25,6 @@ export const trieve = new TrieveSDK({
});
```

With this done you can use any of the functions available to use trieve in your project and get searching:

```ts
import { trieve } from "../trieve";

const data = await trieve.search({
query: "my first query",
search_type: "hybrid",
});
```

To see all the functions we export you can take a look at [our docs](https://ts-sdk.trieve.ai).

## License

MIT

0 comments on commit 74e736d

Please sign in to comment.