Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add generic support for search #35

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

crutchcorn
Copy link
Contributor

This PR adds support for generics to be passed to the Orama Cloud's search APIs

@micheleriva
Copy link
Member

micheleriva commented Aug 22, 2024

Not sure why tests are failing here, they run just well locally:

pnpm t

> @oramacloud/[email protected] test /Users/micheleriva/projects/orama/sdk
> node --no-warnings --loader tsx --test **/*.test.ts

▶ secure proxy
  ✔ summaryStream should abort previous requests (2782.401875ms)
  ✔ can generate summaries (2464.223375ms)
  ✔ can generate openai embeddings (1016.922125ms)
  ✔ can stream chat responses via gpt-4o (2579.5025ms)
  ✔ can stream chat wait for /init (2150.60475ms)
▶ secure proxy (10997.015791ms)

▶ answer session
  ✔ can create an answer session (14818.86425ms)
▶ answer session (14824.053916ms)

▶ answer session - related queries
  ✔ can get related queries (4233.044458ms)
▶ answer session - related queries (4237.584917ms)

▶ can use the manager APIs
  ✔ should be able to empty the index (2069.078125ms)
  ✔ should be able to insert some data (2291.051542ms)
  ✔ should be able to remove some data (1882.082292ms)
  ✔ should be able to deploy the index (6532.936333ms)
▶ can use the manager APIs (12778.526209ms)

▶ state management via answer session APIs
  ✔ onStateChange (8921.329083ms)
  ✔ aborting before .ask resolution (2.340292ms)
▶ state management via answer session APIs (8929.257166ms)

✔ regenerate last answer (15768.51425ms)
▶ client
  ✔ search should return the result (5009.172791ms)
  ✔ vectorSearch should return the result (5009.057ms)
▶ client (10037.777708ms)

▶ profiler
  ✔ should generate a user id, when client is created in Server Side (8.668083ms)
  ✔ should generate a user id, when client is created in Client Side (0.49725ms)
  ✔ should use the persisted a user id, when client is returning in Client Side (0.819542ms)
  ✔ should call identifier service to identify users (15.46725ms)
  ✔ should call identifier service to set alias to user (2.91325ms)
  ✔ should reset the user id (2.371208ms)
▶ profiler (1052.188459ms)

ℹ tests 29
ℹ suites 0
ℹ pass 29
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 67690.016959

LGTM

@micheleriva micheleriva merged commit 23a61d6 into oramasearch:main Aug 22, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants