Read patch generation instructions from file
This commit is contained in:
parent
d38f7c294e
commit
2948089806
2 changed files with 5 additions and 6 deletions
|
|
@ -0,0 +1,3 @@
|
||||||
|
I need you to solve this issue by looking at the provided knowledge graph and
|
||||||
|
generating a single patch file that I can apply directly to this repository using git apply.
|
||||||
|
Please respond with a single patch file in the following format.
|
||||||
|
|
@ -12,6 +12,7 @@ from cognee.api.v1.cognify.code_graph_pipeline import code_graph_pipeline
|
||||||
from cognee.api.v1.search import SearchType
|
from cognee.api.v1.search import SearchType
|
||||||
from cognee.infrastructure.databases.graph import get_graph_engine
|
from cognee.infrastructure.databases.graph import get_graph_engine
|
||||||
from cognee.infrastructure.llm.get_llm_client import get_llm_client
|
from cognee.infrastructure.llm.get_llm_client import get_llm_client
|
||||||
|
from cognee.infrastructure.llm.prompts import read_query_prompt
|
||||||
from evals.eval_utils import download_instances
|
from evals.eval_utils import download_instances
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -29,12 +30,7 @@ async def generate_patch_with_cognee(instance, search_type=SearchType.CHUNKS):
|
||||||
graph_str = f.read()
|
graph_str = f.read()
|
||||||
|
|
||||||
problem_statement = instance['problem_statement']
|
problem_statement = instance['problem_statement']
|
||||||
instructions = (
|
instructions = read_query_prompt("patch_gen_instructions.txt")
|
||||||
"I need you to solve this issue by looking at the provided knowledge graph and by "
|
|
||||||
+ "generating a single patch file that I can apply directly to this repository "
|
|
||||||
+ "using git apply. Please respond with a single patch "
|
|
||||||
+ "file in the following format."
|
|
||||||
)
|
|
||||||
|
|
||||||
prompt = "\n".join([
|
prompt = "\n".join([
|
||||||
instructions,
|
instructions,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue