returnToInnocence commented on code in PR #114:
URL: 
https://github.com/apache/incubator-hugegraph-ai/pull/114#discussion_r1844954501


##########
hugegraph-llm/src/hugegraph_llm/api/models/rag_requests.py:
##########
@@ -21,23 +21,29 @@
 
 
 class RAGRequest(BaseModel):
-    query: str
-    raw_llm: Optional[bool] = False
-    vector_only: Optional[bool] = False
-    graph_only: Optional[bool] = False
-    graph_vector: Optional[bool] = False
+    text: str = ""
+    raw_answer: bool = False
+    vector_only_answer: bool = False
+    graph_only_answer: bool = False
+    graph_vector_answer: bool = False

Review Comment:
   ## 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)
   2. To PyPI optional. The interpretation of the py 
(https://pypi.org/project/optional.py/)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to