diff --git a/core/cat/factory/custom_llm.py b/core/cat/factory/custom_llm.py index 73b99d1a..3e77f482 100644 --- a/core/cat/factory/custom_llm.py +++ b/core/cat/factory/custom_llm.py @@ -1,7 +1,6 @@ from typing import Optional, List, Any, Mapping, Dict import requests from langchain.llms.base import LLM -from cat.log import log class LLMDefault(LLM): @@ -44,11 +43,6 @@ def _call( "options": self.options } - headers = { - 'accept': 'application/json', - 'Content-Type': 'application/json' - } - try: response_json = requests.post(self.url, json=request_body).json() except Exception as exc: @@ -57,7 +51,7 @@ def _call( generated_text = response_json["text"] - return f"AI: {generated_text}" + return generated_text @property def _identifying_params(self) -> Mapping[str, Any]: