@algoveraai/search
TypeScript icon, indicating that this package has built-in type declarations

0.0.82 • Public • Published

AlgoveraAI Search

A react component for integrating Algovera's search functionality.

Getting Started

You will require an API key and an Assistant ID. The API Key can be generated on the Algovera website under the account section. The Assistant ID is the series of characters in the url for your assistant.

Installation

npm install @algoveraai/search

Usage

import { AlgoveraSearch } from "@algoveraai/search";

<AlgoveraSearch apiKey="API_KEY" assistantID="ASSISTANT_ID" />;

Component API (Props)

assistantID string

Unique id that identifies the assistant

apiKey string

API key generated from the Algovera website

endpoint string

Websocket URL of the assistant

basicSearchEndpoint string

URL endpoint for the basic search

basicSearchApiKey string

API key for basic search

showSearch boolean

Display the container

placeholder string

Text displayed on the input box

disclaimer string

Text displayed at the bottom of container

headerLogo ReactNode

Logo to be displayed in the header

searchIcon ReactNode

Icon to be displayed on Search button

askAiIcon ReactNode

Icon to be shown on the Ask AI button

loadingIconColor string

Hex color code for the loading icon

showSuperscript boolean

Display superscript to sources in answer

openSuperscriptInNewTab boolean

Opens the superscript in a new tab

openReferencesInNewTab boolean

Opens the references in a new tab

onBasicSearch function

Callback function that is called when a user clicks on a result. The callback takes two arguments (query: string, result: string).

onAiAsk function

Callback function that is called when question is asked and an answer is provided. The callback takes two arguments (question: string, answer: string).

Readme

Keywords

none

Package Sidebar

Install

npm i @algoveraai/search

Weekly Downloads

16

Version

0.0.82

License

UNLICENSED

Unpacked Size

13.9 MB

Total Files

37

Last publish

Collaborators

  • hithesh98
  • metabacalhau
  • richardblythman
  • hollygrimm