-
Notifications
You must be signed in to change notification settings - Fork 12
Completeness check + web search feature #65
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d2ba10d
local changes
heliamoh 7a882a0
Updated the Evaluator, Added a new function to RAGChain to return inp…
heliamoh 36770a9
created a new function for RAGChainWithMemory that returns source doc…
heliamoh 7789560
pulled main branch changes
heliamoh 6d9fb56
Created a wrapper around the Tavily API, modified the ndoes and workf…
heliamoh ec9af0a
created a wrapper arounf Tavily API
heliamoh ecbac92
updated final result formatting of the wrappers
heliamoh 4d7cf2f
modified query-rewriter and completeness-evaluator
heliamoh bc7d411
created a new query-handler to organize and re-rank external search (…
heliamoh ceafa7b
updated the node and workflow logic & added a new node to format and …
heliamoh cf9f27e
Update nodes.py
heliamoh dea0d30
Update nodes.py
heliamoh 6f42eed
added instructions to make the llm reposne more engaging and clear
heliamoh c771b1c
Merge branch 'main' into completeness-websearch
GFJHogue 7cf292e
integrating external search flow (WIP)
GFJHogue aabed26
integrating external search flow (WIP2)
GFJHogue 1ffacd9
external search flow added to main graph; feature switch added to con…
GFJHogue fa45de9
search results JSX element + code format + tavily rate limit
GFJHogue 4833c7c
fix import
GFJHogue e0b1d5c
don't pass config to subgraph - searches are one-off and shouldn't ge…
GFJHogue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| const getDomainFromUrl = (url) => { | ||
| const { hostname } = new URL(url); | ||
| return hostname; | ||
| }; | ||
|
|
||
| const SearchResults = () => { | ||
| return ( | ||
| <div> | ||
| <div class="prose lg:prose-xl"> | ||
| <p class="leading-7 [&:not(:first-child)]:mt-4 whitespace-pre-wrap break-words"> | ||
| Here are some external resources you may find helpful: | ||
| </p> | ||
| </div> | ||
| <div className="flex flex-col gap-2 p-4 pt-0"> | ||
| {props.results.map((result) => ( | ||
| <a | ||
| key={result.id} | ||
| href={result.url} | ||
| className="flex flex-col items-start gap-2 rounded-lg border p-3 text-left text-sm transition-all hover:bg-accent" | ||
| > | ||
| <div className="flex w-full flex-col gap-1"> | ||
| <div className="flex items-center"> | ||
| <div className="flex items-center gap-2"> | ||
| <div className="font-semibold"> | ||
| {result.title} | ||
| </div> | ||
| </div> | ||
| <div className="ml-auto text-xs text-muted-foreground"> | ||
| {getDomainFromUrl(result.url)} | ||
| </div> | ||
| </div> | ||
| <div | ||
| className="text-xs text-muted-foreground" | ||
| style={{ // line-clamp-2 class not working for some reason | ||
| display: '-webkit-box', | ||
| WebkitBoxOrient: 'vertical', | ||
| WebkitLineClamp: 2, | ||
| overflow: 'hidden', | ||
| }} | ||
| > | ||
| {result.content.substring(0, 300)} | ||
| </div> | ||
| </div> | ||
| </a> | ||
| ))} | ||
| </div> | ||
| </div> | ||
| ) | ||
| }; | ||
|
|
||
| export default SearchResults; |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chainlit's own type annotations on this make it seemingly impossible to satisfy mypy here.