alexandraroze commited on
Commit
3025519
·
1 Parent(s): 8b32ff6

fixed optinal

Browse files
Files changed (1) hide show
  1. src/rag.py +1 -1
src/rag.py CHANGED
@@ -155,7 +155,7 @@ class AICompletion:
155
  self.human = "{text}"
156
  self.model = ChatOpenAI(model=chat_model, temperature=temperature)
157
 
158
- def get_answer(self, system_prompt: str, text: str) -> (str | None):
159
  prompt = ChatPromptTemplate.from_messages([("system", system_prompt),
160
  ("human", self.human)])
161
  chain = prompt | self.model
 
155
  self.human = "{text}"
156
  self.model = ChatOpenAI(model=chat_model, temperature=temperature)
157
 
158
+ def get_answer(self, system_prompt: str, text: str) -> Optional[str]:
159
  prompt = ChatPromptTemplate.from_messages([("system", system_prompt),
160
  ("human", self.human)])
161
  chain = prompt | self.model