From 08bc472b001efcafe4ebef1d0fdd33284d32fa7e Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Wed, 21 May 2025 12:18:30 +0200 Subject: [PATCH] Feat: Removes hardcoded user prompts from adapters ## Description Removes hardcoded user prompts from adapters ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --------- Co-authored-by: lxobr <122801072+lxobr@users.noreply.github.com> --- cognee/infrastructure/llm/generic_llm_api/adapter.py | 3 +-- cognee/infrastructure/llm/ollama/adapter.py | 2 +- cognee/infrastructure/llm/openai/adapter.py | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cognee/infrastructure/llm/generic_llm_api/adapter.py b/cognee/infrastructure/llm/generic_llm_api/adapter.py index 07085c076..228dd3a8e 100644 --- a/cognee/infrastructure/llm/generic_llm_api/adapter.py +++ b/cognee/infrastructure/llm/generic_llm_api/adapter.py @@ -40,8 +40,7 @@ class GenericAPIAdapter(LLMInterface): messages=[ { "role": "user", - "content": f"""Use the given format to - extract information from the following input: {text_input}. """, + "content": f"""{text_input}""", }, { "role": "system", diff --git a/cognee/infrastructure/llm/ollama/adapter.py b/cognee/infrastructure/llm/ollama/adapter.py index 275e59313..4c57a8ed1 100644 --- a/cognee/infrastructure/llm/ollama/adapter.py +++ b/cognee/infrastructure/llm/ollama/adapter.py @@ -39,7 +39,7 @@ class OllamaAPIAdapter(LLMInterface): messages=[ { "role": "user", - "content": f"Use the given format to extract information from the following input: {text_input}", + "content": f"{text_input}", }, { "role": "system", diff --git a/cognee/infrastructure/llm/openai/adapter.py b/cognee/infrastructure/llm/openai/adapter.py index 4a135c1cc..705f01815 100644 --- a/cognee/infrastructure/llm/openai/adapter.py +++ b/cognee/infrastructure/llm/openai/adapter.py @@ -63,8 +63,7 @@ class OpenAIAdapter(LLMInterface): messages=[ { "role": "user", - "content": f"""Use the given format to - extract information from the following input: {text_input}. """, + "content": f"""{text_input}""", }, { "role": "system", @@ -91,8 +90,7 @@ class OpenAIAdapter(LLMInterface): messages=[ { "role": "user", - "content": f"""Use the given format to - extract information from the following input: {text_input}. """, + "content": f"""{text_input}""", }, { "role": "system",