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: reduce document selection overhead #3464

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(chat): formatting
  • Loading branch information
jonathan-rohde committed Jul 8, 2024
commit 3925e78024d91b050885c450823b0ccba5a7fff1
16 changes: 12 additions & 4 deletions src/lib/components/chat/Chat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 678,14 @@
files = [
...files,
...(lastUserMessage?.files?.filter((item) =>
['doc', 'file', 'collection', 'web_search_results', 'tag', 'all_documents'].includes(item.type)
['doc', 'file', 'collection', 'web_search_results', 'tag', 'all_documents'].includes(
item.type
)
) ?? []),
...(responseMessage?.files?.filter((item) =>
['doc', 'file', 'collection', 'web_search_results', 'tag', 'all_documents'].includes(item.type)
['doc', 'file', 'collection', 'web_search_results', 'tag', 'all_documents'].includes(
item.type
)
) ?? [])
].filter(
// Remove duplicates
Expand Down Expand Up @@ -923,10 927,14 @@
files = [
...files,
...(lastUserMessage?.files?.filter((item) =>
['doc', 'file', 'collection', 'web_search_results', 'tag', 'all_documents'].includes(item.type)
['doc', 'file', 'collection', 'web_search_results', 'tag', 'all_documents'].includes(
item.type
)
) ?? []),
...(responseMessage?.files?.filter((item) =>
['doc', 'file', 'collection', 'web_search_results', 'tag', 'all_documents'].includes(item.type)
['doc', 'file', 'collection', 'web_search_results', 'tag', 'all_documents'].includes(
item.type
)
) ?? [])
].filter(
// Remove duplicates
Expand Down