Refactor llm.py template and update version in pyproject.toml.

pull/7/head
Saryev Rustam 12 months ago
parent 6d72db88bb
commit 2260c6dd35

@ -1,6 +1,6 @@
[tool.poetry]
name = "talk-codebase"
version = "0.1.36"
version = "0.1.37"
description = "talk-codebase is a powerful tool for querying and analyzing codebases."
authors = ["Saryev Rustam <rustam1997@gmail.com>"]
readme = "README.md"

@ -89,10 +89,7 @@ class LocalLLM(BaseLLM):
docs = self.embedding_search(query, k=int(k))
content = "\n".join([f"content: \n```{s.page_content}```" for s in docs])
template = """Given the following content, your task is to answer the question.
Content: {content}
Question: {question}
"""
template = "Given the following content, your task is to answer the question.\nQuestion: {question}\n{content}"
prompt = PromptTemplate(template=template, input_variables=["content", "question"]).partial(content=content)
llm_chain = LLMChain(prompt=prompt, llm=self.llm)

Loading…
Cancel
Save