ragflow-sdk-myfbee-test 0.27.2.dev0__tar.gz → 0.27.2.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/PKG-INFO +1 -1
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/pyproject.toml +2 -1
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/modules/dataset.py +5 -12
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/modules/session.py +4 -1
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk_myfbee_test.egg-info/PKG-INFO +1 -1
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/__init__.py +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/modules/__init__.py +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/modules/agent.py +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/modules/base.py +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/modules/chat.py +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/modules/chunk.py +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/modules/document.py +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/modules/memory.py +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/ragflow.py +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk_myfbee_test.egg-info/SOURCES.txt +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk_myfbee_test.egg-info/dependency_links.txt +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk_myfbee_test.egg-info/requires.txt +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk_myfbee_test.egg-info/top_level.txt +0 -0
- {ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ragflow-sdk-myfbee-test
|
|
3
|
-
Version: 0.27.2.
|
|
3
|
+
Version: 0.27.2.dev1
|
|
4
4
|
Summary: Python client sdk of [RAGFlow](https://github.com/infiniflow/ragflow). RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
|
|
5
5
|
Author-email: Zhichang Yu <yuzhichang@gmail.com>
|
|
6
6
|
License: Apache License, Version 2.0
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
|
+
#name = "ragflow-sdk"
|
|
2
3
|
name = "ragflow-sdk-myfbee-test"
|
|
3
|
-
version = "0.27.2
|
|
4
|
+
version = "0.27.2.dev1"
|
|
4
5
|
description = "Python client sdk of [RAGFlow](https://github.com/infiniflow/ragflow). RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding."
|
|
5
6
|
authors = [{ name = "Zhichang Yu", email = "yuzhichang@gmail.com" }]
|
|
6
7
|
license = { text = "Apache License, Version 2.0" }
|
|
@@ -119,17 +119,10 @@ class DataSet(Base):
|
|
|
119
119
|
finished = []
|
|
120
120
|
while pending:
|
|
121
121
|
for doc_id in list(pending):
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return docs[0] if docs else None
|
|
127
|
-
except Exception:
|
|
128
|
-
return None
|
|
129
|
-
|
|
130
|
-
doc = fetch_doc(doc_id)
|
|
131
|
-
if doc is None:
|
|
132
|
-
continue
|
|
122
|
+
docs = self.list_documents(id=doc_id)
|
|
123
|
+
if not docs:
|
|
124
|
+
raise RuntimeError(f"Document {doc_id} not found while waiting for parsing to finish")
|
|
125
|
+
doc = docs[0]
|
|
133
126
|
if isinstance(doc.run, str) and doc.run.upper() in terminal_states:
|
|
134
127
|
finished.append((doc_id, doc.run, doc.chunk_count, doc.token_count))
|
|
135
128
|
pending.discard(doc_id)
|
|
@@ -149,7 +142,7 @@ class DataSet(Base):
|
|
|
149
142
|
def parse_documents(self, document_ids):
|
|
150
143
|
try:
|
|
151
144
|
self.async_parse_documents(document_ids)
|
|
152
|
-
self._get_documents_status(document_ids)
|
|
145
|
+
return self._get_documents_status(document_ids)
|
|
153
146
|
except KeyboardInterrupt:
|
|
154
147
|
self.async_cancel_parse_documents(document_ids)
|
|
155
148
|
|
|
@@ -149,14 +149,17 @@ class Session(Base):
|
|
|
149
149
|
def _structure_answer(self, json_data):
|
|
150
150
|
answer = ""
|
|
151
151
|
event = None
|
|
152
|
+
message_id = None
|
|
152
153
|
if self.__session_type == "agent":
|
|
153
154
|
event = json_data.get("event")
|
|
155
|
+
message_id = json_data.get("message_id")
|
|
154
156
|
json_data = json_data["data"]
|
|
155
157
|
answer = json_data.get("content", "")
|
|
156
158
|
elif self.__session_type == "chat":
|
|
157
159
|
answer = json_data["answer"]
|
|
160
|
+
message_id = json_data.get("id")
|
|
158
161
|
reference = json_data.get("reference", {})
|
|
159
|
-
temp_dict = {"content": answer, "role": "assistant"}
|
|
162
|
+
temp_dict = {"id": message_id, "content": answer, "role": "assistant"}
|
|
160
163
|
if reference and "chunks" in reference:
|
|
161
164
|
chunks = reference["chunks"]
|
|
162
165
|
if isinstance(chunks, dict):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ragflow-sdk-myfbee-test
|
|
3
|
-
Version: 0.27.2.
|
|
3
|
+
Version: 0.27.2.dev1
|
|
4
4
|
Summary: Python client sdk of [RAGFlow](https://github.com/infiniflow/ragflow). RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
|
|
5
5
|
Author-email: Zhichang Yu <yuzhichang@gmail.com>
|
|
6
6
|
License: Apache License, Version 2.0
|
{ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ragflow_sdk_myfbee_test-0.27.2.dev0 → ragflow_sdk_myfbee_test-0.27.2.dev1}/ragflow_sdk/ragflow.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|