Skip to content

Commit

Permalink
fix: async persist problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aries-ckt committed Jul 24, 2024
1 parent 2a4f072 commit 17bcd72
Show file tree
Hide file tree
Showing 19 changed files with 20 additions and 28 deletions.
2 changes: 1 addition & 1 deletion dbgpt/app/static/404.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/404/index.html

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/agent/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/app/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/chat/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/database/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/flow/canvas/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/flow/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/knowledge/chunk/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/knowledge/graph/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/knowledge/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/models/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dbgpt/app/static/prompt/index.html

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions dbgpt/serve/rag/service/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,17 +507,9 @@ async def async_doc_embedding(
f"Found dag by tag key: {TAG_KEY_KNOWLEDGE_FACTORY_DOMAIN_TYPE}"
f" and value: {space.domain_type}, dag: {dags[0]}"
)
executor = CFG.SYSTEM_APP.get_component(
ComponentType.EXECUTOR_DEFAULT, ExecutorFactory
).create()
db_name, chunk_docs = await blocking_func_to_async(
executor,
end_task._blocking_call,
{"file_path": doc.content, "space": doc.space},
db_name, chunk_docs = await end_task.call(
{"file_path": doc.content, "space": doc.space}
)
# db_name, chunk_docs = await end_task.call(
# {"file_path": doc.content, "space": doc.space}
# )
doc.chunk_size = len(chunk_docs)
vector_ids = [chunk.chunk_id for chunk in chunk_docs]
else:
Expand Down
4 changes: 2 additions & 2 deletions web/components/knowledge/space-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ export default function SpaceForm(props: IProps) {
})}
</Select>
</Form.Item>
<Form.Item<FieldType> label={t('Business Field')} name="field" rules={[{ required: true, message: t('Please_select_the_domain_type') }]}>
<Select className="mb-5 h-12" placeholder={t('Please_select_the_domain_type')}>
<Form.Item<FieldType> label={t('Domain Type')} name="field" rules={[{ required: true, message: t('Please select the domain type') }]}>
<Select className="mb-5 h-12" placeholder={t('Please select the domain type')}>
{spaceConfig
?.find((item) => item.name === storage)
?.domain_types.map((item) => {
Expand Down

0 comments on commit 17bcd72

Please sign in to comment.