Skip to content

Commit

Permalink
chore: rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
aaa006bd committed Sep 8, 2023
1 parent d702100 commit dabba51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ai/question.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _cleanup_chats():
chatMemories.pop(chat_id)


def _get_chat(chat_id: str)->ConversationBufferMemory:
def _get_chat_memory(chat_id: str)->ConversationBufferMemory:
_cleanup_chats()

chatMemories.setdefault(chat_id, {
Expand Down Expand Up @@ -50,7 +50,7 @@ def ask(repo_id: int, chat_id: str, question: str):
retriever.search_kwargs["maximal_marginal_relevance"] = True
retriever.search_kwargs["k"] = 20

memory = _get_chat(chat_id)
memory = _get_chat_memory(chat_id)

qa = ConversationalRetrievalChain.from_llm(
llm=ChatOpenAI(temperature=0),
Expand Down

0 comments on commit dabba51

Please sign in to comment.