Skip to content

Commit

Permalink
Document store fix
Browse files Browse the repository at this point in the history
  • Loading branch information
szczyglis-dev committed Dec 16, 2024
1 parent ab3ac58 commit 8529de5
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/pygpt_net/core/attachments/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def upload(

# extract text content using data loader, and get docs if type == file
content, docs = self.read_content(attachment, src_file, prompt)
if attachment.type == AttachmentItem.TYPE_URL:
if attachment.type == AttachmentItem.TYPE_FILE:
documents = docs

if content:
Expand Down Expand Up @@ -470,21 +470,6 @@ def store_content(
type=loader,
extra_args=input_params,
)
"""
self.window.controller.idx.indexer.index_web(
self.current_idx,
loader,
input_params,
input_config,
is_replace,
)
web_type = self.window.core.idx.indexing.get_webtype(attachment.path)
content = self.window.core.idx.indexing.read_web_content(
url=attachment.path,
type=web_type, # webpage, default, TODO: add more types
extra_args={},
)
"""
# src file save
name = "url.txt"
path = os.path.join(dir, name)
Expand Down

0 comments on commit 8529de5

Please sign in to comment.