Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
adeelehsan committed Jul 18, 2024
1 parent a916c31 commit a6d6896
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ When set, this will calculate the [Factual Consistency Score (FCS)](https://docs

Define the [summarizer and prompt](https://docs.vectara.com/docs/learn/grounded-generation/select-a-summarizer) to use to generate the chat response.

##### `numberOfSearchResults` (optional)

Define the number of search results to be used to generate summary. Default is set to 15.

##### `rerankerId` (optional)

Define the reranker Id to be used , Defaults to 272725718.

##### `lambda` (optional)

How much to weigh lexical scores compared to the embedding score. 0 means lexical search is not used at all, and 1 means only lexical search is used.

### Use your own views with the useChat hook

Install React-Chatbot:
Expand Down
2 changes: 2 additions & 0 deletions src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export interface Props {
// Define the reranker Id to be used , Defaults to "272725718"
rerankerId?: RerankerId;

// How much to weigh lexical scores compared to the embedding score. 0 means lexical search is not used at all,
// and 1 means only lexical search is used.
lambda?: number;

// Enables streaming responses from the API. Defaults to true.
Expand Down
2 changes: 1 addition & 1 deletion src/useChat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export const useChat = ({

}
})

resultsWithSnippets = response.search_results.map((result: SearchResult) => {
const { pre, text, post } = parseSnippet(result.text);

Expand Down

0 comments on commit a6d6896

Please sign in to comment.