system is not a list, it is handled and assisgned as string

This commit is contained in:
Aashraya
2024-08-21 16:31:50 +05:30
committed by GitHub
parent 40fe4ce6fb
commit ec6063ecc4

View File

@@ -43,7 +43,7 @@ from pipecat.processors.aggregators.llm_response import (
from loguru import logger
try:
from anthropic import AsyncAnthropic
from anthropic import AsyncAnthropic, NOT_GIVEN, NotGiven
except ModuleNotFoundError as e:
logger.error(f"Exception: {e}")
logger.error(
@@ -135,7 +135,7 @@ class AnthropicLLMService(LLMService):
response = await api_call(
tools=context.tools or [],
system=context.system or [],
system=context.system,
messages=messages,
model=self._model,
max_tokens=self._max_tokens,
@@ -270,7 +270,7 @@ class AnthropicLLMContext(OpenAILLMContext):
tools: list[dict] | None = None,
tool_choice: dict | None = None,
*,
system: List | None = None
system: str | NotGiven = NOT_GIVEN
):
super().__init__(messages=messages, tools=tools, tool_choice=tool_choice)
self._user_image_request_context = {}