Skip to content

Commit

Permalink
fix string chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
yaojin3616 committed Dec 20, 2023
1 parent f4a8c4e commit d805b35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/backend/bisheng/api/v1/knowledge.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def text_knowledge(
except Exception as e:
logger.exception(e)

separator = ['\n\n', '\n', ' ', '']
separator = '\n\n'
chunk_size = 500
chunk_overlap = 50

Expand Down
2 changes: 1 addition & 1 deletion src/backend/bisheng/api/v2/filelib.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def delete_knowledge(
@router.post('/file/{knowledge_id}', status_code=200)
async def upload_file(*,
knowledge_id: int,
callback_url: str = Form(...),
callback_url: Optional[str] = Form(None),
file: UploadFile = File(...),
background_tasks: BackgroundTasks,
session: Session = Depends(get_session)):
Expand Down

0 comments on commit d805b35

Please sign in to comment.