Skip to content

fix(rag): rag api critical bug & rename some params#114

Merged
imbajin merged 9 commits intoapache:mainfrom
returnToInnocence:20241114-fixRagApiLog
Nov 18, 2024
Merged

fix(rag): rag api critical bug & rename some params#114
imbajin merged 9 commits intoapache:mainfrom
returnToInnocence:20241114-fixRagApiLog

Conversation

@returnToInnocence
Copy link
Collaborator

@returnToInnocence returnToInnocence commented Nov 15, 2024

  1. Added "Enable api authentication based on ENABLE_LOGIN in .env file". (in file hugegraph-llm/src/hugegraph_llm/demo/rag_demo/app.py)

  2. Synchronize according to the arguments of the latest rag_answer function. (in other changes files)

  3. remove Optional, My reasons for removing optional:
    The purpose of using optional is to make the value support None, but since I have assigned it by default, None will never happen, so the optional is effectively invalid, so it is removed

    remove Optional References:

    1. Fastapi official documentation (https://fastapi.tiangolo.com/python-types/#using-union-or-optional)

@github-actions github-actions bot added the llm label Nov 15, 2024
@returnToInnocence returnToInnocence marked this pull request as ready for review November 16, 2024 01:55
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Nov 16, 2024
Comment on lines 24 to 28
text: str = ""
raw_answer: bool = False
vector_only_answer: bool = False
graph_only_answer: bool = False
graph_vector_answer: bool = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove Optional?

Copy link
Collaborator Author

@returnToInnocence returnToInnocence Nov 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reasons for removing optional:

The purpose of using optional is to make the value support None, but since I have assigned it by default, None will never happen, so the optional is effectively invalid, so it is removed

References:

  1. Fastapi official documentation (https://fastapi.tiangolo.com/python-types/#using-union-or-optional)

Co-authored-by: imbajin <jin@apache.org>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Nov 18, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 18, 2024
@imbajin imbajin changed the title fix(rag): rag api fault bug fix fix(rag): rag api critical bug & rename some params Nov 18, 2024
@imbajin imbajin merged commit aeb25bd into apache:main Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer llm size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants