-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fixes message hook trigger and SSE parsing
- Loading branch information
1 parent
29f8665
commit 96ed6ac
Showing
4 changed files
with
34 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
export * from './client.js' | ||
export * from './proxy.js' | ||
|
||
import { OramaClient } from './client.js' | ||
import { parseSSE } from './utils.js' | ||
|
||
const client = new OramaClient({ | ||
endpoint: 'https://cloud.orama.run/v1/indexes/nodejs-org-prod-vo71di', | ||
api_key: '9A3alsqP5owMUvA4zeHdWrz93yxYZXra' | ||
}) | ||
|
||
const answerSession = client.createAnswerSession({ | ||
events: { | ||
onMessageChange: console.log | ||
} | ||
}) | ||
|
||
await answerSession.ask({ | ||
term: 'Release schedule' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters