Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

Add inference models & template optional insertion (#32)

Louis Choquele76c9b826dc6
diff --git a/.cursor/rules/prompt-templates.mdc b/.cursor/rules/prompt-templates.mdc
index b8d086c04..aea74bd47 100644
--- a/.cursor/rules/prompt-templates.mdc
+++ b/.cursor/rules/prompt-templates.mdc
@@ -33,6 +33,28 @@ In this example, the expense data and the invoices data are obviously made of se
**DO NOT write things like "Here is the expense: @expense".**
**DO write simply "@expense" alone in an isolated line.**
+## Insert stuff inside a tagged block only if it exists (optional)
+
+If you want to conditionally insert a block only when the variable exists and is not empty, use the "@?" prefix. This is useful for optional fields that may or may not be present in your data.
+
+Example template:
+```python
+prompt_template = """
+User Profile:
+
+@name
+
+@?bio
+
+@?contact_info
+
+Please summarize this profile.
+"""
+```
+In this example, the bio and contact_info will only be inserted if they exist. If they don't exist or are empty, those sections will be completely omitted from the rendered template.
+
+**DO use "@?optional_field" when the field might not always be present.**
+**DO NOT use "@optional_field" for fields that might be missing - this would cause an error.**
## Insert stuff inline
diff --git a/.env.example b/.env.example
index d41b892a3..fb1897997 100644
--- a/.env.example
+++ b/.env.example
@@ -23,5 +23,8 @@ GCP_PROJECT_ID=
GCP_REGION=
GCP_CREDENTIALS_FILE_PATH=path/to/credentials.json
+XAI_API_KEY=
+XAI_API_ENDPOINT=https://api.x.ai/v1/
+
CUSTOM_ENDPOINT_BASE_URL=http://localhost:11434/v1/ # this is the default url for local ollama server
CUSTOM_ENDPOINT_API_KEY=
diff --git a/pipelex/cogt/config_cogt.py b/pipelex/cogt/config_cogt.py
index d9002dd0e..acaa440ca 100644
--- a/pipelex/cogt/config_cogt.py
+++ b/pipelex/cogt/config_cogt.py
@@ -14,6 +14,7 @@ from pipelex.cogt.plugin.openai.custom_endpoint_config import CustomEndpointConf
from pipelex.cogt.plugin.openai.openai_config import OpenAIOpenAIConfig
from pipelex.cogt.plugin.openai.perplexity_config import PerplexityConfig
from pipelex.cogt.plugin.openai.vertexai_config import VertexAIConfig
+from pipelex.cogt.plugin.openai.xai_config import XaiConfig
from pipelex.tools.config.models import ConfigModel
@@ -55,6 +56,7 @@ class LLMConfig(ConfigModel):
mistral_config: MistralConfig
openai_openai_config: OpenAIOpenAIConfig
perplexity_config: PerplexityConfig
+ xai_config: XaiConfig
custom_endpoint_config: CustomEndpointConfig
instructor_config: InstructorConfig
diff --git a/pipelex/cogt/exceptions.py b/pipelex/cogt/exceptions.py
index f6d237134..18239c954 100644
--- a/pipelex/cogt/exceptions.py
+++ b/pipelex/cogt/exceptions.py
@@ -63,6 +63,10 @@ class LLMModelDefinitionError(CogtError):
pass
+class LLMModelNotFoundError(CogtError):
+ pass
+
+
class LLMCapabilityError(CogtError):
pass
@@ -83,7 +87,7 @@ class LLMPromptTemplateInputsError(CogtError):
pass
-class LLMPromptError(CogtError):
+class LLMPromptParameterError(CogtError):
pass
@@ -99,6 +103,18 @@ class ImggPromptError(CogtError):
pass
+class ImggParameterError(CogtError):
+ pass
+
+
+class ImggGenerationError(CogtError):
+ pass
+
+
+class ImggGeneratedTypeError(ImggGenerationError):
+ pass
+
+
class MissingDependencyError(CogtError):
"""Raised when a required dependency is not installed."""
diff --git a/pipelex/cogt/imgg/imgg_engine.py b/pipelex/cogt/imgg/imgg_engine.py
index cf4e0f382..0fa0efd51 100644
--- a/pipelex/cogt/imgg/imgg_engine.py
+++ b/pipelex/cogt/imgg/imgg_engine.py
@@ -9,4 +9,4 @@ class ImggEngine(BaseModel):
@property
def desc(self) -> str:
- return f"Imgg Engine {self.imgg_platform}/{self.imgg_model_name}"
+ return f"Imgg Engine '{self.imgg_platform}/{self.imgg_model_name}'"
diff --git a/pipelex/cogt/imgg/imgg_engine_factory.py b/pipelex/cogt/imgg/imgg_engine_factory.py
index 03f0eb7bc..325565b4e 100644
--- a/pipelex/cogt/imgg/imgg_engine_factory.py
+++ b/pipelex/cogt/imgg/imgg_engine_factory.py
@@ -16,14 +16,13 @@ class ImggEngineFactory:
if "/" not in imgg_handle:
raise ImggEngineFactoryError(f"Invalid Imgg handle: {imgg_handle}. Expected format: platform/model_name")
+ # split at the first "/"
parts = imgg_handle.split("/", 1)
- if len(parts) != 2:
- raise ImggEngineFactoryError(f"Invalid Imgg handle: {imgg_handle}. Expected format: platform/model_name")
try:
imgg_platform = ImggPlatform(parts[0])
except ValueError:
- raise ImggEngineFactoryError(f"Invalid Imgg platform: {parts[0]}")
+ raise ImggEngineFactoryError(f"Unknown Imgg platform:' {parts[0]}' extracted from handle '{imgg_handle}'")
imgg_model_name = parts[1]
diff --git a/pipelex/cogt/imgg/imgg_handle.py b/pipelex/cogt/imgg/imgg_handle.py
index fae2bea4b..54112497b 100644
--- a/pipelex/cogt/imgg/imgg_handle.py
+++ b/pipelex/cogt/imgg/imgg_handle.py
@@ -7,3 +7,4 @@ class ImggHandle(StrEnum):
FLUX_1_1_PRO = "fal-ai/flux-pro/v1.1"
FLUX_1_1_ULTRA = "fal-ai/flux-pro/v1.1-ultra"
SDXL_LIGHTNING = "fal-ai/fast-lightning-sdxl"
+ OPENAI_GPT_IMAGE_1 = "openai/gpt-image-1"
diff --git a/pipelex/cogt/imgg/imgg_job_components.py b/pipelex/cogt/imgg/imgg_job_components.py
index 2797fac1d..1e1ecff03 100644
--- a/pipelex/cogt/imgg/imgg_job_components.py
+++ b/pipelex/cogt/imgg/imgg_job_components.py
@@ -9,9 +9,11 @@ from pipelex.tools.config.models import ConfigModel
class AspectRatio(StrEnum):
SQUARE = "square"
LANDSCAPE_4_3 = "landscape_4_3"
+ LANDSCAPE_3_2 = "landscape_3_2"
LANDSCAPE_16_9 = "landscape_16_9"
LANDSCAPE_21_9 = "landscape_21_9"
PORTRAIT_3_4 = "portrait_4_3"
+ PORTRAIT_2_3 = "portrait_2_3"
PORTRAIT_9_16 = "portrait_9_16"
PORTRAIT_9_21 = "portrait_9_21"
@@ -22,11 +24,25 @@ class OutputFormat(StrEnum):
WEBP = "webp"
+class Quality(StrEnum):
+ LOW = "low"
+ MEDIUM = "medium"
+ HIGH = "high"
+
+
+class Background(StrEnum):
+ TRANSPARENT = "transparent"
+ OPAQUE = "opaque"
+ AUTO = "auto"
+
+
class ImggJobParams(BaseModel):
aspect_ratio: AspectRatio = Field(strict=False)
- nb_steps: int = Field(..., gt=0)
+ background: Background = Field(strict=False)
+ quality: Optional[Quality] = Field(default=None, strict=False)
+ nb_steps: Optional[int] = Field(default=None, gt=0)
guidance_scale: float = Field(..., gt=0)
- is_safety_checker_enabled: bool
+ is_moderated: bool
safety_tolerance: int = Field(..., ge=1, le=6)
is_raw: bool
output_format: OutputFormat = Field(strict=False)
@@ -35,9 +51,11 @@ class ImggJobParams(BaseModel):
class ImggJobParamsDefaults(ConfigModel):
aspect_ratio: AspectRatio = Field(strict=False)
- nb_steps: int = Field(..., gt=0)
+ background: Background = Field(strict=False)
+ quality: Optional[Quality] = Field(default=None, strict=False)
+ nb_steps: Optional[int] = Field(default=None, gt=0)
guidance_scale: float = Field(..., gt=0)
- is_safety_checker_enabled: bool
+ is_moderated: bool
safety_tolerance: int = Field(..., ge=1, le=6)
is_raw: bool
output_format: OutputFormat = Field(strict=False)
@@ -51,9 +69,11 @@ class ImggJobParamsDefaults(ConfigModel):
seed = self.seed
return ImggJobParams(
aspect_ratio=self.aspect_ratio,
+ background=self.background,
+ quality=self.quality,
nb_steps=self.nb_steps,
guidance_scale=self.guidance_scale,
- is_safety_checker_enabled=self.is_safety_checker_enabled,
+ is_moderated=self.is_moderated,
safety_tolerance=self.safety_tolerance,
is_raw=self.is_raw,
output_format=self.output_format,
diff --git a/pipelex/cogt/imgg/imgg_job_factory.py b/pipelex/cogt/imgg/imgg_job_factory.py
index 106111bc5..f416b1725 100644
--- a/pipelex/cogt/imgg/imgg_job_factory.py
+++ b/pipelex/cogt/imgg/imgg_job_factory.py
@@ -39,7 +39,7 @@ class ImggJobFactory:
@classmethod
def make_imgg_job_from_prompt_contents(
cls,
- positive_text: Optional[str] = None,
+ positive_text: str,
imgg_job_params: Optional[ImggJobParams] = None,
imgg_job_config: Optional[ImggJobConfig] = None,
job_metadata: Optional[JobMetadata] = None,
diff --git a/pipelex/cogt/imgg/imgg_platform.py b/pipelex/cogt/imgg/imgg_platform.py
index c7c41f398..4570281fa 100644
--- a/pipelex/cogt/imgg/imgg_platform.py
+++ b/pipelex/cogt/imgg/imgg_platform.py
@@ -3,3 +3,4 @@ from enum import StrEnum
class ImggPlatform(StrEnum):
FAL_AI = "fal-ai"
+ OPENAI = "openai"
diff --git a/pipelex/cogt/imgg/imgg_prompt.py b/pipelex/cogt/imgg/imgg_prompt.py
index a0efa972b..dbff961af 100644
--- a/pipelex/cogt/imgg/imgg_prompt.py
+++ b/pipelex/cogt/imgg/imgg_prompt.py
@@ -1,5 +1,3 @@
-from typing import Optional
-
from pydantic import BaseModel
from typing_extensions import override
@@ -10,7 +8,7 @@ from pipelex.tools.runtime_manager import ProblemReaction, runtime_manager
class ImggPrompt(BaseModel):
- positive_text: Optional[str] = None
+ positive_text: str
def validate_before_execution(self):
reaction = runtime_manager.problem_reactions.job
@@ -18,13 +16,9 @@ class ImggPrompt(BaseModel):
case ProblemReaction.NONE:
pass
case ProblemReaction.RAISE:
- if self.positive_text is None:
- raise ImggPromptError("Imgg prompt positive_text cannot be None (or can it?)")
if self.positive_text == "":
raise ImggPromptError("Imgg prompt positive_text must not be an empty string")
case ProblemReaction.LOG:
- if self.positive_text is None:
- log.warning("Imgg prompt positive_text is None, that's not good, or is it?")
if self.positive_text == "":
log.warning("Imgg prompt positive_text should not be an empty string")
diff --git a/pipelex/cogt/imgg/imgg_worker_factory.py b/pipelex/cogt/imgg/imgg_worker_factory.py
index 07fd57cb3..14ced57e5 100644
--- a/pipelex/cogt/imgg/imgg_worker_factory.py
+++ b/pipelex/cogt/imgg/imgg_worker_factory.py
@@ -5,6 +5,8 @@ from pipelex.cogt.imgg.imgg_engine import ImggEngine
from pipelex.cogt.imgg.imgg_platform import ImggPlatform
from pipelex.cogt.imgg.imgg_worker_abstract import ImggWorkerAbstract
from pipelex.cogt.inference.inference_report_delegate import InferenceReportDelegate
+from pipelex.cogt.llm.llm_models.llm_platform import LLMPlatform
+from pipelex.cogt.plugin.openai.openai_imgg_worker import OpenAIImggWorker
from pipelex.cogt.plugin_manager import PluginHandle
from pipelex.hub import get_plugin_manager, get_secret
from pipelex.tools.secrets.secrets_errors import SecretNotFoundError
@@ -49,5 +51,18 @@ class ImggWorkerFactory:
imgg_engine=imgg_engine,
report_delegate=report_delegate,
)
+ case ImggPlatform.OPENAI:
+ from pipelex.cogt.plugin.openai.openai_factory import OpenAIFactory
+
+ imgg_sdk_instance = plugin_manager.get_llm_sdk_instance(llm_sdk_handle=imgg_sdk_handle) or plugin_manager.set_llm_sdk_instance(
+ llm_sdk_handle=imgg_sdk_handle,
+ llm_sdk_instance=OpenAIFactory.make_openai_client(llm_platform=LLMPlatform.OPENAI),
+ )
+
+ imgg_worker = OpenAIImggWorker(
+ sdk_instance=imgg_sdk_instance,
+ imgg_engine=imgg_engine,
+ report_delegate=report_delegate,
+ )
return imgg_worker
diff --git a/pipelex/cogt/llm/llm_models/llm_family.py b/pipelex/cogt/llm/llm_models/llm_family.py
index 8f9a8af20..d6d0ce7d2 100644
--- a/pipelex/cogt/llm/llm_models/llm_family.py
+++ b/pipelex/cogt/llm/llm_models/llm_family.py
@@ -13,6 +13,7 @@ class LLMCreator(StrEnum):
META = "Meta"
MISTRAL = "Mistral"
PERPLEXITY = "Perplexity"
+ XAI = "XAI"
@property
def prompting_target(self) -> LLMPromptingTarget:
@@ -25,7 +26,7 @@ class LLMCreator(StrEnum):
return LLMPromptingTarget.MISTRAL
case LLMCreator.GOOGLE:
return LLMPromptingTarget.GEMINI
- case LLMCreator.AMAZON | LLMCreator.PERPLEXITY | LLMCreator.META | LLMCreator.DEEPSEEK:
+ case LLMCreator.AMAZON | LLMCreator.PERPLEXITY | LLMCreator.META | LLMCreator.DEEPSEEK | LLMCreator.XAI:
return LLMPromptingTarget.OPENAI
@property
@@ -47,21 +48,24 @@ class LLMCreator(StrEnum):
return "purple"
case LLMCreator.DEEPSEEK:
return "red"
+ case LLMCreator.XAI:
+ return "green"
class LLMFamily(StrEnum):
- GPT_4 = "gpt-4"
- GPT_3_5 = "gpt-3.5"
GPT_3 = "gpt-3"
+ GPT_3_5 = "gpt-3.5"
+ GPT_4 = "gpt-4"
+ GPT_4O = "gpt-4o"
GPT_4_5 = "gpt-4.5"
GPT_4_1 = "gpt-4.1"
- GPT_4O = "gpt-4o"
O_SERIES = "o"
+
CLAUDE_3 = "claude-3"
CLAUDE_3_5 = "claude-3.5"
CLAUDE_3_7 = "claude-3.7"
- CLAUDE_2 = "claude-2"
- CLAUDE_INSTANT = "claude-instant"
+ CLAUDE_4 = "claude-4"
+
MISTRAL_7B = "mistral-7b"
MISTRAL_8X7B = "mistral-8x7b"
MISTRAL_LARGE = "mistral-large"
@@ -69,9 +73,12 @@ class LLMFamily(StrEnum):
MISTRAL_CODESTRAL = "mistral-codestral"
MINISTRAL = "ministral"
PIXTRAL = "pixtral"
+
LLAMA_3 = "llama-3"
LLAMA_3_1 = "llama-3.1"
+
GEMINI = "gemini"
+
BEDROCK_MISTRAL_LARGE = "bedrock-mistral-large"
BEDROCK_ANTHROPIC_CLAUDE = "bedrock-anthropic-claude"
BEDROCK_META_LLAMA_3 = "bedrock-meta-llama-3"
@@ -82,6 +89,8 @@ class LLMFamily(StrEnum):
PERPLEXITY_REASONING = "perplexity-reasoning"
PERPLEXITY_DEEPSEEK = "perplexity-deepseek"
+ GROK_3 = "grok-3"
+
CUSTOM_LLAMA_4 = "custom-llama-4"
CUSTOM_GEMMA_3 = "custom-gemma-3"
@@ -92,7 +101,7 @@ class LLMFamily(StrEnum):
LLMFamily.GPT_4 | LLMFamily.GPT_3_5 | LLMFamily.GPT_3 | LLMFamily.O_SERIES | LLMFamily.GPT_4_5 | LLMFamily.GPT_4_1 | LLMFamily.GPT_4O
):
return LLMCreator.OPENAI
- case LLMFamily.CLAUDE_3 | LLMFamily.CLAUDE_3_5 | LLMFamily.CLAUDE_2 | LLMFamily.CLAUDE_INSTANT | LLMFamily.CLAUDE_3_7:
+ case LLMFamily.CLAUDE_3 | LLMFamily.CLAUDE_3_5 | LLMFamily.CLAUDE_3_7 | LLMFamily.CLAUDE_4:
return LLMCreator.ANTHROPIC
case LLMFamily.BEDROCK_ANTHROPIC_CLAUDE:
return LLMCreator.ANTHROPIC
@@ -120,6 +129,8 @@ class LLMFamily(StrEnum):
return LLMCreator.PERPLEXITY
case LLMFamily.PERPLEXITY_DEEPSEEK:
return LLMCreator.DEEPSEEK
+ case LLMFamily.GROK_3:
+ return LLMCreator.XAI
case LLMFamily.CUSTOM_LLAMA_4 | LLMFamily.CUSTOM_GEMMA_3:
return LLMCreator.META
diff --git a/pipelex/cogt/llm/llm_models/llm_model.py b/pipelex/cogt/llm/llm_models/llm_model.py
index 8306187bc..8f7a924a7 100644
--- a/pipelex/cogt/llm/llm_models/llm_model.py
+++ b/pipelex/cogt/llm/llm_models/llm_model.py
@@ -19,6 +19,7 @@ class LLMModel(BaseModel):
version: str
is_gen_object_supported: bool
is_vision_supported: bool = False
+ # TODO: add skill regarding live online data access
cost_per_million_tokens_usd: Optional[TokenCostsByCategoryDict] = None
platform_llm_id: Dict[LLMPlatform, str] = Field(..., min_length=1)
max_tokens: Optional[int] = None
diff --git a/pipelex/cogt/llm/llm_models/llm_platform.py b/pipelex/cogt/llm/llm_models/llm_platform.py
index 2d2b9ffe8..048b5f4dd 100644
--- a/pipelex/cogt/llm/llm_models/llm_platform.py
+++ b/pipelex/cogt/llm/llm_models/llm_platform.py
@@ -17,6 +17,7 @@ class LLMPlatform(StrEnum):
OPENAI = "openai"
PERPLEXITY = "perplexity"
VERTEXAI_OPENAI = "vertexai_openai"
+ XAI = "xai"
CUSTOM_OPENAI = "custom_openai"
@staticmethod
@@ -26,6 +27,8 @@ class LLMPlatform(StrEnum):
LLMPlatform.AZURE_OPENAI,
LLMPlatform.VERTEXAI_OPENAI,
LLMPlatform.PERPLEXITY,
+ LLMPlatform.XAI,
+ LLMPlatform.CUSTOM_OPENAI,
]
@staticmethod
@@ -47,6 +50,7 @@ class LLMPlatform(StrEnum):
| LLMPlatform.ANTHROPIC
| LLMPlatform.MISTRAL
| LLMPlatform.BEDROCK_ANTHROPIC
+ | LLMPlatform.XAI
| LLMPlatform.CUSTOM_OPENAI
):
return True
@@ -72,6 +76,8 @@ class LLMPlatform(StrEnum):
return "gray"
case LLMPlatform.VERTEXAI_OPENAI:
return "deep_sky_blue"
+ case LLMPlatform.XAI:
+ return "green"
case LLMPlatform.CUSTOM_OPENAI:
return "white"
diff --git a/pipelex/cogt/llm/llm_prompt.py b/pipelex/cogt/llm/llm_prompt.py
index a0c701df3..3cca009ad 100644
--- a/pipelex/cogt/llm/llm_prompt.py
+++ b/pipelex/cogt/llm/llm_prompt.py
@@ -4,7 +4,7 @@ from pydantic import BaseModel
from typing_extensions import override
from pipelex import log
-from pipelex.cogt.exceptions import LLMPromptError
+from pipelex.cogt.exceptions import LLMPromptParameterError
from pipelex.cogt.image.prompt_image import PromptImage
from pipelex.tools.misc.string_utils import is_none_or_has_text, is_not_none_and_has_text
from pipelex.tools.runtime_manager import ProblemReaction, runtime_manager
@@ -25,9 +25,9 @@ class LLMPrompt(BaseModel):
if self.system_text == "":
log.warning(f"system_text should be None or contain text. system_text = '{self.system_text}'")
else:
- raise LLMPromptError("system_text should be None or contain text")
+ raise LLMPromptParameterError("system_text should be None or contain text")
if not is_not_none_and_has_text(text=self.user_text):
- raise LLMPromptError("user_text should contain text")
+ raise LLMPromptParameterError("user_text should contain text")
case ProblemReaction.LOG:
if not is_none_or_has_text(text=self.system_text):
if self.system_text == "":
diff --git a/pipelex/cogt/llm/llm_worker_factory.py b/pipelex/cogt/llm/llm_worker_factory.py
index 3b282d792..6f309fc23 100644
--- a/pipelex/cogt/llm/llm_worker_factory.py
+++ b/pipelex/cogt/llm/llm_worker_factory.py
@@ -21,7 +21,7 @@ class LLMWorkerFactory:
plugin_manager = get_plugin_manager()
llm_worker: LLMWorkerAbstract
match llm_engine.llm_platform:
- case LLMPlatform.OPENAI | LLMPlatform.AZURE_OPENAI | LLMPlatform.PERPLEXITY:
+ case LLMPlatform.OPENAI | LLMPlatform.AZURE_OPENAI | LLMPlatform.PERPLEXITY | LLMPlatform.XAI:
from pipelex.cogt.plugin.openai.openai_factory import OpenAIFactory
structure_method: Optional[StructureMethod] = None
diff --git a/pipelex/cogt/plugin/anthropic/anthropic_config.py b/pipelex/cogt/plugin/anthropic/anthropic_config.py
index 7c77361ac..fbd9a21b4 100644
--- a/pipelex/cogt/plugin/anthropic/anthropic_config.py
+++ b/pipelex/cogt/plugin/anthropic/anthropic_config.py
@@ -1,4 +1,5 @@
from enum import StrEnum
+from typing import Literal, Optional, Union
from pydantic import Field
@@ -23,8 +24,15 @@ ANTHROPIC_API_KEY_VAR_NAME = "ANTHROPIC_API_KEY"
class AnthropicConfig(ConfigModel):
+ claude_4_reduced_tokens_limit: Union[int, Literal["unlimited"]] = Field(default="unlimited")
api_key_method: AnthropicKeyMethod = Field(strict=False)
+ @property
+ def claude_4_tokens_limit(self) -> Optional[int]:
+ if self.claude_4_reduced_tokens_limit == "unlimited":
+ return None
+ return self.claude_4_reduced_tokens_limit
+
def configure(self, secrets_provider: SecretsProviderAbstract) -> str:
return self.get_api_key(secrets_provider=secrets_provider)
diff --git a/pipelex/cogt/plugin/anthropic/anthropic_llm_worker.py b/pipelex/cogt/plugin/anthropic/anthropic_llm_worker.py
index 32d0e2621..1fded6d34 100644
--- a/pipelex/cogt/plugin/anthropic/anthropic_llm_worker.py
+++ b/pipelex/cogt/plugin/anthropic/anthropic_llm_worker.py
@@ -5,6 +5,7 @@ from anthropic import NOT_GIVEN, AsyncAnthropic, AsyncAnthropicBedrock
from typing_extensions import override
from pipelex import log
+from pipelex.cogt.exceptions import LLMCompletionError, LLMEngineParameterError, SdkTypeError
from pipelex.cogt.inference.inference_report_delegate import InferenceReportDelegate
from pipelex.cogt.llm.llm_job import LLMJob
from pipelex.cogt.llm.llm_job_func import llm_job_func
@@ -13,6 +14,7 @@ from pipelex.cogt.llm.llm_models.llm_platform import LLMPlatform
from pipelex.cogt.llm.llm_worker_abstract import LLMWorkerAbstract
from pipelex.cogt.llm.structured_output import StructureMethod
from pipelex.cogt.plugin.anthropic.anthropic_factory import AnthropicFactory
+from pipelex.config import get_config
from pipelex.tools.typing.pydantic_utils import BaseModelTypeVar
@@ -30,19 +32,22 @@ class AnthropicLLMWorker(LLMWorkerAbstract):
structure_method=structure_method,
report_delegate=report_delegate,
)
+ self.default_max_tokens: int
if default_max_tokens := llm_engine.llm_model.max_tokens:
self.default_max_tokens = default_max_tokens
else:
- raise ValueError("max_tokens is None, which is required for Anthropic models")
+ raise LLMEngineParameterError(
+ f"No max_tokens provided for llm model '{self.llm_engine.llm_model.desc}', but it is required for Anthropic"
+ )
# Verify if the sdk_instance is compatible with the current LLM platform
if isinstance(sdk_instance, (AsyncAnthropic, AsyncAnthropicBedrock)):
if llm_engine.llm_platform == LLMPlatform.ANTHROPIC and not (isinstance(sdk_instance, AsyncAnthropic)):
- raise ValueError(f"Provided sdk_instance does not match LLMEngine platform:{sdk_instance}")
+ raise SdkTypeError(f"Provided sdk_instance does not match LLMEngine platform:{sdk_instance}")
elif llm_engine.llm_platform == LLMPlatform.BEDROCK_ANTHROPIC and not (isinstance(sdk_instance, AsyncAnthropicBedrock)):
- raise ValueError(f"Provided sdk_instance does not match LLMEngine platform:{sdk_instance}")
+ raise SdkTypeError(f"Provided sdk_instance does not match LLMEngine platform:{sdk_instance}")
else:
- raise ValueError(f"Provided sdk_instance does not match LLMEngine platform:{sdk_instance}")
+ raise SdkTypeError(f"Provided sdk_instance does not match LLMEngine platform:{sdk_instance}")
self.anthropic_async_client = sdk_instance
if structure_method:
@@ -56,6 +61,15 @@ class AnthropicLLMWorker(LLMWorkerAbstract):
# Instance methods
#########################################################
+ # TODO: implement streaming behind the scenes to avoid timeout/streaming errors with Claude 4 and high tokens
+ def _adapt_max_tokens(self, max_tokens: Optional[int]) -> int:
+ max_tokens = max_tokens or self.default_max_tokens
+ if claude_4_tokens_limit := get_config().cogt.llm_config.anthropic_config.claude_4_tokens_limit:
+ if max_tokens > claude_4_tokens_limit:
+ max_tokens = claude_4_tokens_limit
+ log.warning(f"Max tokens is greater than the claude 4 reduced tokens limit, reducing to {max_tokens}")
+ return max_tokens
+
@override
@llm_job_func
async def gen_text(
@@ -63,22 +77,23 @@ class AnthropicLLMWorker(LLMWorkerAbstract):
llm_job: LLMJob,
) -> str:
message = await AnthropicFactory.make_user_message(llm_job=llm_job)
+ max_tokens = self._adapt_max_tokens(max_tokens=llm_job.job_params.max_tokens)
response = await self.anthropic_async_client.messages.create(
messages=[message],
system=llm_job.llm_prompt.system_text or NOT_GIVEN,
model=self.llm_engine.llm_id,
temperature=llm_job.job_params.temperature,
- max_tokens=llm_job.job_params.max_tokens or self.default_max_tokens,
+ max_tokens=max_tokens,
)
single_content_block = response.content[0]
if single_content_block.type != "text":
- raise ValueError(f"Unexpected content block type: {single_content_block.type}")
+ raise LLMCompletionError(f"Unexpected content block type: {single_content_block.type}\nmodel: {self.llm_engine.llm_model.desc}")
full_reply_content = single_content_block.text
single_content_block = response.content[0]
if single_content_block.type != "text":
- raise ValueError(f"Unexpected content block type: {single_content_block.type}")
+ raise LLMCompletionError(f"Unexpected content block type: {single_content_block.type}\nmodel: {self.llm_engine.llm_model.desc}")
full_reply_content = single_content_block.text
if (llm_tokens_usage := llm_job.job_report.llm_tokens_usage) and (usage := response.usage):
@@ -94,13 +109,14 @@ class AnthropicLLMWorker(LLMWorkerAbstract):
schema: Type[BaseModelTypeVar],
) -> BaseModelTypeVar:
messages = await AnthropicFactory.make_simple_messages(llm_job=llm_job)
+ max_tokens = self._adapt_max_tokens(max_tokens=llm_job.job_params.max_tokens)
result_object, completion = await self.instructor_for_objects.chat.completions.create_with_completion(
messages=messages,
response_model=schema,
max_retries=llm_job.job_config.max_retries,
model=self.llm_engine.llm_id,
temperature=llm_job.job_params.temperature,
- max_tokens=llm_job.job_params.max_tokens or self.default_max_tokens,
+ max_tokens=max_tokens,
)
if (llm_tokens_usage := llm_job.job_report.llm_tokens_usage) and (usage := completion.usage):
llm_tokens_usage.nb_tokens_by_category = AnthropicFactory.make_nb_tokens_by_category(usage=usage)
diff --git a/pipelex/cogt/plugin/anthropic/anthropic_llms.py b/pipelex/cogt/plugin/anthropic/anthropic_llms.py
index b34883c0b..c1b21c4be 100644
--- a/pipelex/cogt/plugin/anthropic/anthropic_llms.py
+++ b/pipelex/cogt/plugin/anthropic/anthropic_llms.py
@@ -3,7 +3,7 @@ from typing import List
from anthropic import AsyncAnthropic
from anthropic.types import ModelInfo
-from pipelex.cogt.exceptions import LLMSDKError
+from pipelex.cogt.exceptions import LLMModelProviderError, LLMSDKError
from pipelex.cogt.llm.llm_models.llm_platform import LLMPlatform
from pipelex.cogt.plugin.anthropic.anthropic_factory import AnthropicFactory
@@ -22,8 +22,8 @@ async def anthropic_list_anthropic_models(llm_platform: LLMPlatform) -> List[Mod
raise LLMSDKError("We only support the standard Anthropic client for listing models")
models_response = await anthropic_client.models.list()
if not models_response:
- raise ValueError("No models found")
+ raise LLMModelProviderError("No models found")
models_list = models_response.data
if not models_list:
- raise ValueError("No models found")
+ raise LLMModelProviderError("No models found")
return sorted(models_list, key=lambda model: model.created_at)
diff --git a/pipelex/cogt/plugin/bedrock/bedrock_llm_worker.py b/pipelex/cogt/plugin/bedrock/bedrock_llm_worker.py
index 3eee4eed8..7dee3c7a2 100644
--- a/pipelex/cogt/plugin/bedrock/bedrock_llm_worker.py
+++ b/pipelex/cogt/plugin/bedrock/bedrock_llm_worker.py
@@ -38,9 +38,7 @@ class BedrockLLMWorker(LLMWorkerAbstract):
if default_max_tokens := llm_engine.llm_model.max_tokens:
self.default_max_tokens = default_max_tokens
else:
- raise LLMEngineParameterError(
- f"No max_tokens provided for llm model '{llm_engine.llm_model}', but it must be provided for Bedrock models"
- )
+ raise LLMEngineParameterError(f"No max_tokens provided for llm model '{self.llm_engine.llm_model.desc}', but it is required for Bedrock")
self.bedrock_client_for_text = sdk_instance
@override
@@ -71,4 +69,5 @@ class BedrockLLMWorker(LLMWorkerAbstract):
llm_job: LLMJob,
schema: Type[BaseModelTypeVar],
) -> BaseModelTypeVar:
+ # TODO: try with the newest instructor release
raise LLMCapabilityError(f"It is not possible to generate objects with a {self.__class__.__name__}.")
diff --git a/pipelex/cogt/plugin/fal/fal_factory.py b/pipelex/cogt/plugin/fal/fal_factory.py
index a89c276be..2778f432c 100644
--- a/pipelex/cogt/plugin/fal/fal_factory.py
+++ b/pipelex/cogt/plugin/fal/fal_factory.py
@@ -1,20 +1,12 @@
-from typing import Any, Dict, List
+from typing import Any, Dict, List, Optional
from pipelex import log
-from pipelex.cogt.exceptions import CogtError
+from pipelex.cogt.exceptions import ImggGeneratedTypeError, ImggParameterError
from pipelex.cogt.image.generated_image import GeneratedImage
from pipelex.cogt.imgg.imgg_engine import ImggEngine
from pipelex.cogt.imgg.imgg_handle import ImggHandle
from pipelex.cogt.imgg.imgg_job import ImggJob
-from pipelex.cogt.imgg.imgg_job_components import AspectRatio, OutputFormat
-
-
-class FalFactoryTypeError(CogtError):
- pass
-
-
-class FalParameterError(CogtError):
- pass
+from pipelex.cogt.imgg.imgg_job_components import AspectRatio, OutputFormat, Quality
class FalFactory:
@@ -23,7 +15,27 @@ class FalFactory:
return f"{imgg_engine.imgg_platform}/{imgg_engine.imgg_model_name}"
@classmethod
- def image_size_for_flux_1(cls, aspect_ratio: AspectRatio) -> str:
+ def make_nb_steps_from_quality_for_flux_pro(cls, quality: Quality) -> int:
+ match quality:
+ case Quality.LOW:
+ return 14
+ case Quality.MEDIUM:
+ return 28
+ case Quality.HIGH:
+ return 56
+
+ @classmethod
+ def make_nb_steps_from_quality_for_sdxl_lightning(cls, quality: Quality) -> int:
+ match quality:
+ case Quality.LOW:
+ return 2
+ case Quality.MEDIUM:
+ return 4
+ case Quality.HIGH:
+ return 8
+
+ @classmethod
+ def make_image_size_for_flux_1(cls, aspect_ratio: AspectRatio) -> str:
match aspect_ratio:
case AspectRatio.SQUARE:
return "square_hd"
@@ -39,9 +51,11 @@ class FalFactory:
return "portrait_16_9"
case AspectRatio.PORTRAIT_9_21:
return "portrait_21_9"
+ case AspectRatio.LANDSCAPE_3_2 | AspectRatio.PORTRAIT_2_3:
+ raise ImggParameterError(f"Aspect ratio '{aspect_ratio}' is not supported by Flux-1 image generation model")
@classmethod
- def aspect_ratio_for_flux_1_1_ultra(cls, aspect_ratio: AspectRatio) -> str:
+ def make_aspect_ratio_for_flux_1_1_ultra(cls, aspect_ratio: AspectRatio) -> str:
match aspect_ratio:
case AspectRatio.SQUARE:
return "1:1"
@@ -57,16 +71,18 @@ class FalFactory:
return "9:16"
case AspectRatio.PORTRAIT_9_21:
return "9:21"
+ case AspectRatio.LANDSCAPE_3_2 | AspectRatio.PORTRAIT_2_3:
+ raise ImggParameterError(f"Aspect ratio '{aspect_ratio}' is not supported by Flux-1.1 Ultra image generation model")
@classmethod
- def output_format_for_flux(cls, output_format: OutputFormat) -> str:
+ def make_output_format_for_flux(cls, output_format: OutputFormat) -> str:
match output_format:
case OutputFormat.PNG:
return "png"
case OutputFormat.JPG:
return "jpeg"
case OutputFormat.WEBP:
- raise FalParameterError("Output format WebP is not supported for Flux")
+ raise ImggParameterError("Output format WebP is not supported for Flux")
@classmethod
def make_fal_arguments(
@@ -77,49 +93,56 @@ class FalFactory:
) -> Dict[str, Any]:
params = imgg_job.job_params
args_dict: Dict[str, Any]
+ num_inference_steps: Optional[int]
match fal_application:
case ImggHandle.FLUX_1_PRO_LEGACY | ImggHandle.FLUX_1_1_PRO:
+ num_inference_steps = params.nb_steps
+ if not num_inference_steps and (quality := params.quality):
+ num_inference_steps = cls.make_nb_steps_from_quality_for_flux_pro(quality=quality)
+
args_dict = {
"prompt": imgg_job.imgg_prompt.positive_text,
- "image_size": cls.image_size_for_flux_1(params.aspect_ratio),
- "num_inference_steps": params.nb_steps,
+ "image_size": cls.make_image_size_for_flux_1(params.aspect_ratio),
+ "num_inference_steps": num_inference_steps,
"guidance_scale": params.guidance_scale,
"num_images": nb_images,
- "enable_safety_checker": params.is_safety_checker_enabled,
+ "enable_safety_checker": params.is_moderated,
"safety_tolerance": params.safety_tolerance,
"seed": params.seed,
- "output_format": cls.output_format_for_flux(params.output_format),
+ "output_format": cls.make_output_format_for_flux(params.output_format),
"sync_mode": imgg_job.job_config.is_sync_mode,
}
case ImggHandle.FLUX_1_1_ULTRA:
args_dict = {
"prompt": imgg_job.imgg_prompt.positive_text,
- "aspect_ratio": cls.aspect_ratio_for_flux_1_1_ultra(params.aspect_ratio),
+ "aspect_ratio": cls.make_aspect_ratio_for_flux_1_1_ultra(params.aspect_ratio),
"num_images": nb_images,
- "enable_safety_checker": params.is_safety_checker_enabled,
+ "enable_safety_checker": params.is_moderated,
"safety_tolerance": params.safety_tolerance,
"raw": params.is_raw,
"seed": params.seed,
- "output_format": cls.output_format_for_flux(params.output_format),
+ "output_format": cls.make_output_format_for_flux(params.output_format),
"sync_mode": imgg_job.job_config.is_sync_mode,
}
case ImggHandle.SDXL_LIGHTNING:
num_inference_steps = params.nb_steps
+ if not num_inference_steps and (quality := params.quality):
+ num_inference_steps = cls.make_nb_steps_from_quality_for_sdxl_lightning(quality=quality)
acceptable_steps = [1, 2, 4, 8]
if num_inference_steps not in acceptable_steps:
log.warning(f"Number of inference steps {num_inference_steps}' for SDXL Lightning must be one of {acceptable_steps}")
num_inference_steps = 8
args_dict = {
"prompt": imgg_job.imgg_prompt.positive_text,
- "image_size": cls.image_size_for_flux_1(params.aspect_ratio),
+ "image_size": cls.make_image_size_for_flux_1(params.aspect_ratio),
"num_inference_steps": num_inference_steps,
"num_images": nb_images,
"seed": params.seed,
- "output_format": cls.output_format_for_flux(params.output_format),
+ "output_format": cls.make_output_format_for_flux(params.output_format),
"sync_mode": imgg_job.job_config.is_sync_mode,
}
case _:
- raise FalParameterError(f"Invalid fal application: '{fal_application}'")
+ raise ImggParameterError(f"Invalid fal application: '{fal_application}'")
return args_dict
@@ -129,15 +152,15 @@ class FalFactory:
fal_image_dict = images[0]
image_url = fal_image_dict["url"]
if not isinstance(image_url, str):
- raise FalFactoryTypeError("Image url is not a string")
+ raise ImggGeneratedTypeError("Image url is not a string")
# TODO: if the url is actual image data, send it to cloud storage?
width = fal_image_dict["width"]
if not isinstance(width, int):
- raise FalFactoryTypeError("Image width is not an integer")
+ raise ImggGeneratedTypeError("Image width is not an integer")
height = fal_image_dict["height"]
if not isinstance(height, int):
- raise FalFactoryTypeError("Image height is not an integer")
+ raise ImggGeneratedTypeError("Image height is not an integer")
generated_image = GeneratedImage(
url=image_url,
@@ -154,14 +177,14 @@ class FalFactory:
for fal_image_dict in fal_image_dicts:
image_url = fal_image_dict["url"]
if not isinstance(image_url, str):
- raise FalFactoryTypeError("Image url is not a string")
+ raise ImggGeneratedTypeError("Image url is not a string")
width = fal_image_dict["width"]
if not isinstance(width, int):
- raise FalFactoryTypeError("Image width is not an integer")
+ raise ImggGeneratedTypeError("Image width is not an integer")
height = fal_image_dict["height"]
if not isinstance(height, int):
- raise FalFactoryTypeError("Image height is not an integer")
+ raise ImggGeneratedTypeError("Image height is not an integer")
generated_image = GeneratedImage(
url=image_url,
diff --git a/pipelex/cogt/plugin/mistral/mistral_llm_worker.py b/pipelex/cogt/plugin/mistral/mistral_llm_worker.py
index b92886c3c..b13ba1876 100644
--- a/pipelex/cogt/plugin/mistral/mistral_llm_worker.py
+++ b/pipelex/cogt/plugin/mistral/mistral_llm_worker.py
@@ -33,9 +33,7 @@ class MistralLLMWorker(LLMWorkerAbstract):
if default_max_tokens := llm_engine.llm_model.max_tokens:
self.default_max_tokens = default_max_tokens
else:
- raise LLMEngineParameterError(
- f"No max_tokens provided for llm model '{llm_engine.llm_model}', but it must be provided for Mistral models"
- )
+ raise LLMEngineParameterError(f"No max_tokens provided for llm model '{self.llm_engine.llm_model.desc}', but it is required for Mistral")
self.mistral_client_for_text: Mistral = sdk_instance
if structure_method:
diff --git a/pipelex/cogt/plugin/mistral/mistral_llms.py b/pipelex/cogt/plugin/mistral/mistral_llms.py
index 9787e3c54..579f13fad 100644
--- a/pipelex/cogt/plugin/mistral/mistral_llms.py
+++ b/pipelex/cogt/plugin/mistral/mistral_llms.py
@@ -2,6 +2,7 @@ from typing import List
from mistralai.models import Data
+from pipelex.cogt.exceptions import LLMModelProviderError
from pipelex.cogt.plugin.mistral.mistral_factory import MistralFactory
@@ -9,8 +10,8 @@ def list_mistral_models() -> List[Data]:
mistral_client = MistralFactory.make_mistral_client()
models_list_response = mistral_client.models.list()
if not models_list_response:
- raise ValueError("No models found")
+ raise LLMModelProviderError("No models found")
models_list = models_list_response.data
if not models_list:
- raise ValueError("No models found")
+ raise LLMModelProviderError("No models found")
return sorted(models_list, key=lambda model: model.id)
diff --git a/pipelex/cogt/plugin/openai/openai_errors.py b/pipelex/cogt/plugin/openai/openai_errors.py
deleted file mode 100644
index 43d440ec0..000000000
--- a/pipelex/cogt/plugin/openai/openai_errors.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from pipelex.cogt.exceptions import CogtError
-
-
-class OpenAIWorkerError(CogtError):
- pass
-
-
-class OpenAIWorkerModelNotFoundError(OpenAIWorkerError):
- pass
diff --git a/pipelex/cogt/plugin/openai/openai_factory.py b/pipelex/cogt/plugin/openai/openai_factory.py
index b602b6b00..555cc4123 100644
--- a/pipelex/cogt/plugin/openai/openai_factory.py
+++ b/pipelex/cogt/plugin/openai/openai_factory.py
@@ -13,7 +13,7 @@ from openai.types.chat.chat_completion_content_part_image_param import ImageURL
from openai.types.completion_usage import CompletionUsage
from pipelex import log
-from pipelex.cogt.exceptions import CogtError
+from pipelex.cogt.exceptions import LLMEngineParameterError, LLMPromptParameterError
from pipelex.cogt.image.prompt_image import PromptImage, PromptImageBytes, PromptImagePath, PromptImageUrl
from pipelex.cogt.llm.llm_job import LLMJob
from pipelex.cogt.llm.llm_models.llm_engine import LLMEngine
@@ -24,10 +24,6 @@ from pipelex.hub import get_secrets_provider
from pipelex.tools.misc.base_64_utils import load_binary_as_base64
-class OpenAIFactoryError(CogtError):
- pass
-
-
class OpenAIFactory:
@classmethod
def make_openai_client(cls, llm_platform: LLMPlatform) -> openai.AsyncClient:
@@ -66,6 +62,15 @@ class OpenAIFactory:
api_key=api_key,
base_url=endpoint,
)
+ case LLMPlatform.XAI:
+ xai_config = get_config().cogt.llm_config.xai_config
+ endpoint, api_key = xai_config.configure(secrets_provider=get_secrets_provider())
+
+ log.verbose(f"Making Xai AsyncOpenAI client with endpoint: {endpoint}")
+ the_client = openai.AsyncOpenAI(
+ api_key=api_key,
+ base_url=endpoint,
+ )
case LLMPlatform.CUSTOM_OPENAI:
custom_endpoint_config = get_config().cogt.llm_config.custom_endpoint_config
base_url, api_key = custom_endpoint_config.configure(secrets_provider=get_secrets_provider())
@@ -76,7 +81,7 @@ class OpenAIFactory:
base_url=base_url,
)
case LLMPlatform.ANTHROPIC | LLMPlatform.BEDROCK | LLMPlatform.BEDROCK_ANTHROPIC | LLMPlatform.MISTRAL:
- raise OpenAIFactoryError(f"Platform '{llm_platform}' is not supported by this factory '{cls.__name__}'")
+ raise LLMEngineParameterError(f"Platform '{llm_platform}' is not supported by this factory '{cls.__name__}'")
return the_client
@@ -121,7 +126,7 @@ class OpenAIFactory:
image_bytes = load_binary_as_base64(path=prompt_image.file_path)
return cls.make_openai_image_url(PromptImageBytes(b64_image_bytes=image_bytes))
else:
- raise ValueError(f"prompt_image of type {type(prompt_image)} is not supported")
+ raise LLMPromptParameterError(f"prompt_image of type {type(prompt_image)} is not supported")
return openai_image_url
@staticmethod
diff --git a/pipelex/cogt/plugin/openai/openai_imgg_factory.py b/pipelex/cogt/plugin/openai/openai_imgg_factory.py
new file mode 100644
index 000000000..1233e53d2
--- /dev/null
+++ b/pipelex/cogt/plugin/openai/openai_imgg_factory.py
@@ -0,0 +1,65 @@
+from typing import Literal
+
+from pipelex.cogt.exceptions import ImggParameterError
+from pipelex.cogt.imgg.imgg_job_components import AspectRatio, Background, OutputFormat, Quality
+
+GptImage1SizeType = Literal["1024x1024", "1536x1024", "1024x1536"]
+GptImage1OutputFormatType = Literal["png", "jpeg", "webp"]
+GptImage1ModerationType = Literal["low", "auto"]
+GptImage1QualityType = Literal["low", "medium", "high"]
+GptImage1BackgroundType = Literal["transparent", "opaque", "auto"]
+
+
+class OpenAIImggFactory:
+ @classmethod
+ def image_size_for_gpt_image_1(cls, aspect_ratio: AspectRatio) -> GptImage1SizeType:
+ match aspect_ratio:
+ case AspectRatio.SQUARE:
+ return "1024x1024"
+ case AspectRatio.LANDSCAPE_3_2:
+ return "1536x1024"
+ case AspectRatio.PORTRAIT_2_3:
+ return "1024x1536"
+ case (
+ AspectRatio.LANDSCAPE_4_3
+ | AspectRatio.LANDSCAPE_16_9
+ | AspectRatio.LANDSCAPE_21_9
+ | AspectRatio.PORTRAIT_3_4
+ | AspectRatio.PORTRAIT_9_16
+ | AspectRatio.PORTRAIT_9_21
+ ):
+ raise ImggParameterError(f"Aspect ratio '{aspect_ratio}' is not supported by GPT Image 1 model")
+
+ @classmethod
+ def output_format_for_gpt_image_1(cls, output_format: OutputFormat) -> GptImage1OutputFormatType:
+ match output_format:
+ case OutputFormat.PNG:
+ return "png"
+ case OutputFormat.JPG:
+ return "jpeg"
+ case OutputFormat.WEBP:
+ return "webp"
+
+ @classmethod
+ def moderation_for_gpt_image_1(cls, is_moderated: bool) -> GptImage1ModerationType:
+ return "auto" if is_moderated else "low"
+
+ @classmethod
+ def quality_for_gpt_image_1(cls, quality: Quality) -> GptImage1QualityType:
+ match quality:
+ case Quality.LOW:
+ return "low"
+ case Quality.MEDIUM:
+ return "medium"
+ case Quality.HIGH:
+ return "high"
+
+ @classmethod
+ def background_for_gpt_image_1(cls, background: Background) -> GptImage1BackgroundType:
+ match background:
+ case Background.TRANSPARENT:
+ return "transparent"
+ case Background.OPAQUE:
+ return "opaque"
+ case Background.AUTO:
+ return "auto"
diff --git a/pipelex/cogt/plugin/openai/openai_imgg_worker.py b/pipelex/cogt/plugin/openai/openai_imgg_worker.py
new file mode 100644
index 000000000..b043c7309
--- /dev/null
+++ b/pipelex/cogt/plugin/openai/openai_imgg_worker.py
@@ -0,0 +1,92 @@
+from typing import Any, List, Optional
+
+import openai
+import shortuuid
+from typing_extensions import override
+
+from pipelex import log
+from pipelex.cogt.exceptions import ImggGenerationError, SdkTypeError
+from pipelex.cogt.image.generated_image import GeneratedImage
+from pipelex.cogt.imgg.imgg_engine import ImggEngine
+from pipelex.cogt.imgg.imgg_job import ImggJob
+from pipelex.cogt.imgg.imgg_job_components import Quality
+from pipelex.cogt.imgg.imgg_worker_abstract import ImggWorkerAbstract, imgg_job_func
+from pipelex.cogt.inference.inference_report_delegate import InferenceReportDelegate
+from pipelex.cogt.plugin.openai.openai_imgg_factory import OpenAIImggFactory
+from pipelex.tools.misc.base_64_utils import save_base64_to_binary_file
+from pipelex.tools.misc.file_utils import ensure_path
+
+TEMP_OUTPUTS_DIR = "temp/imgg_by_gpt_image"
+
+
+class OpenAIImggWorker(ImggWorkerAbstract):
+ def __init__(
+ self,
+ sdk_instance: Any,
+ imgg_engine: ImggEngine,
+ report_delegate: Optional[InferenceReportDelegate] = None,
+ ):
+ super().__init__(imgg_engine=imgg_engine, report_delegate=report_delegate)
+
+ if not isinstance(sdk_instance, openai.AsyncOpenAI):
+ raise SdkTypeError(f"Provided Imgg sdk_instance is not of type openai.AsyncOpenAI: it's a '{type(sdk_instance)}'")
+
+ self.openai_client = sdk_instance
+
+ @override
+ @imgg_job_func
+ async def gen_image(
+ self,
+ imgg_job: ImggJob,
+ ) -> GeneratedImage:
+ one_image_list = await self.gen_image_list(imgg_job=imgg_job, nb_images=1)
+ generated_image = one_image_list[0]
+ return generated_image
+
+ @override
+ @imgg_job_func
+ async def gen_image_list(
+ self,
+ imgg_job: ImggJob,
+ nb_images: int,
+ ) -> List[GeneratedImage]:
+ image_size = OpenAIImggFactory.image_size_for_gpt_image_1(aspect_ratio=imgg_job.job_params.aspect_ratio)
+ output_format = OpenAIImggFactory.output_format_for_gpt_image_1(output_format=imgg_job.job_params.output_format)
+ moderation = OpenAIImggFactory.moderation_for_gpt_image_1(is_moderated=imgg_job.job_params.is_moderated)
+ background = OpenAIImggFactory.background_for_gpt_image_1(background=imgg_job.job_params.background)
+ quality = OpenAIImggFactory.quality_for_gpt_image_1(quality=imgg_job.job_params.quality or Quality.LOW)
+ output_compression = 100
+ result = await self.openai_client.images.generate(
+ prompt=imgg_job.imgg_prompt.positive_text,
+ model=self.imgg_engine.imgg_model_name,
+ moderation=moderation,
+ background=background,
+ quality=quality,
+ size=image_size,
+ output_format=output_format,
+ output_compression=output_compression,
+ n=nb_images,
+ )
+ if not result.data:
+ raise ImggGenerationError("No result from OpenAI")
+
+ generated_image_list: List[GeneratedImage] = []
+ image_id = shortuuid.uuid()[:4]
+ for image_index, image_data in enumerate(result.data):
+ image_base64 = image_data.b64_json
+ if not image_base64:
+ raise ImggGenerationError("No base64 image data received from OpenAI")
+
+ folder_path = TEMP_OUTPUTS_DIR
+ ensure_path(folder_path)
+ img_path = f"{folder_path}/{image_id}_{image_index}.png"
+ save_base64_to_binary_file(b64=image_base64, file_path=img_path)
+ log.debug(f"Saved image to {img_path}")
+ generated_image_list.append(
+ GeneratedImage(
+ url=img_path,
+ width=1024,
+ height=1024,
+ )
+ )
+ return generated_image_list
diff --git a/pipelex/cogt/plugin/openai/openai_llm_worker.py b/pipelex/cogt/plugin/openai/openai_llm_worker.py
index 12d735b6a..3c3ddddd2 100644
--- a/pipelex/cogt/plugin/openai/openai_llm_worker.py
+++ b/pipelex/cogt/plugin/openai/openai_llm_worker.py
@@ -2,12 +2,12 @@ from typing import Any, Optional, Type
import instructor
import openai
-from openai import NOT_GIVEN, APIConnectionError, NotFoundError
+from openai import NOT_GIVEN, APIConnectionError, BadRequestError, NotFoundError
from openai.types.chat import ChatCompletionMessage
from typing_extensions import override
from pipelex import log
-from pipelex.cogt.exceptions import SdkTypeError
+from pipelex.cogt.exceptions import LLMCompletionError, LLMEngineParameterError, LLMModelNotFoundError, SdkTypeError
from pipelex.cogt.inference.inference_report_delegate import InferenceReportDelegate
from pipelex.cogt.llm.llm_job import LLMJob
from pipelex.cogt.llm.llm_job_func import llm_job_func
@@ -15,7 +15,6 @@ from pipelex.cogt.llm.llm_models.llm_engine import LLMEngine
from pipelex.cogt.llm.llm_models.llm_family import LLMFamily
from pipelex.cogt.llm.llm_worker_abstract import LLMWorkerAbstract
from pipelex.cogt.llm.structured_output import StructureMethod
-from pipelex.cogt.plugin.openai.openai_errors import OpenAIWorkerError, OpenAIWorkerModelNotFoundError
from pipelex.cogt.plugin.openai.openai_factory import OpenAIFactory
from pipelex.tools.typing.pydantic_utils import BaseModelTypeVar
@@ -85,6 +84,11 @@ class OpenAILLMWorker(LLMWorkerAbstract):
| LLMFamily.GPT_4O
| LLMFamily.CUSTOM_LLAMA_4
| LLMFamily.CUSTOM_GEMMA_3
+ | LLMFamily.PERPLEXITY_SEARCH
+ | LLMFamily.PERPLEXITY_RESEARCH
+ | LLMFamily.PERPLEXITY_REASONING
+ | LLMFamily.PERPLEXITY_DEEPSEEK
+ | LLMFamily.GROK_3
):
response = await self.openai_client_for_text.chat.completions.create(
model=self.llm_engine.llm_id,
@@ -97,8 +101,7 @@ class OpenAILLMWorker(LLMWorkerAbstract):
LLMFamily.CLAUDE_3
| LLMFamily.CLAUDE_3_5
| LLMFamily.CLAUDE_3_7
- | LLMFamily.CLAUDE_2
- | LLMFamily.CLAUDE_INSTANT
+ | LLMFamily.CLAUDE_4
| LLMFamily.MISTRAL_7B
| LLMFamily.MISTRAL_8X7B
| LLMFamily.MISTRAL_LARGE
@@ -112,25 +115,25 @@ class OpenAILLMWorker(LLMWorkerAbstract):
| LLMFamily.BEDROCK_ANTHROPIC_CLAUDE
| LLMFamily.BEDROCK_META_LLAMA_3
| LLMFamily.BEDROCK_AMAZON_NOVA
- | LLMFamily.PERPLEXITY_SEARCH
- | LLMFamily.PERPLEXITY_RESEARCH
- | LLMFamily.PERPLEXITY_REASONING
- | LLMFamily.PERPLEXITY_DEEPSEEK
):
- raise OpenAIWorkerError(f"LLM family {self.llm_engine.llm_model.llm_family} is not supported by OpenAILLMWorker")
+ raise LLMEngineParameterError(f"LLM family {self.llm_engine.llm_model.llm_family} is not supported by OpenAILLMWorker")
except NotFoundError as not_found_error:
# TODO: record llm config so it can be displayed here
- raise OpenAIWorkerModelNotFoundError(
+ raise LLMModelNotFoundError(
f"OpenAI model or deployment not found:\n{self.llm_engine.desc}\nmodel: {self.llm_engine.llm_model.desc}\n{not_found_error}"
) from not_found_error
except APIConnectionError as api_connection_error:
- raise OpenAIWorkerError(f"OpenAI API connection error: {api_connection_error}") from api_connection_error
+ raise LLMCompletionError(f"OpenAI API connection error: {api_connection_error}") from api_connection_error
+ except BadRequestError as bad_request_error:
+ raise LLMCompletionError(
+ f"OpenAI bad request error with model: {self.llm_engine.llm_model.desc}:\n{bad_request_error}"
+ ) from bad_request_error
openai_message: ChatCompletionMessage = response.choices[0].message
response_text = openai_message.content
if response_text is None:
print("This helper does not support tools, if we don't get content, something is wrong.")
- raise ValueError(f"OpenAI response message content is None: {response}")
+ raise LLMCompletionError(f"OpenAI response message content is None: {response}\nmodel: {self.llm_engine.llm_model.desc}")
if (llm_tokens_usage := llm_job.job_report.llm_tokens_usage) and (usage := response.usage):
llm_tokens_usage.nb_tokens_by_category = OpenAIFactory.make_nb_tokens_by_category(usage=usage)
@@ -180,6 +183,11 @@ class OpenAILLMWorker(LLMWorkerAbstract):
| LLMFamily.GPT_4O
| LLMFamily.CUSTOM_LLAMA_4
| LLMFamily.CUSTOM_GEMMA_3
+ | LLMFamily.PERPLEXITY_SEARCH
+ | LLMFamily.PERPLEXITY_RESEARCH
+ | LLMFamily.PERPLEXITY_REASONING
+ | LLMFamily.PERPLEXITY_DEEPSEEK
+ | LLMFamily.GROK_3
):
result_object, completion = await self.instructor_for_objects.chat.completions.create_with_completion(
model=self.llm_engine.llm_id,
@@ -194,8 +202,7 @@ class OpenAILLMWorker(LLMWorkerAbstract):
LLMFamily.CLAUDE_3
| LLMFamily.CLAUDE_3_5
| LLMFamily.CLAUDE_3_7
- | LLMFamily.CLAUDE_2
- | LLMFamily.CLAUDE_INSTANT
+ | LLMFamily.CLAUDE_4
| LLMFamily.MISTRAL_7B
| LLMFamily.MISTRAL_8X7B
| LLMFamily.MISTRAL_LARGE
@@ -209,14 +216,14 @@ class OpenAILLMWorker(LLMWorkerAbstract):
| LLMFamily.BEDROCK_ANTHROPIC_CLAUDE
| LLMFamily.BEDROCK_META_LLAMA_3
| LLMFamily.BEDROCK_AMAZON_NOVA
- | LLMFamily.PERPLEXITY_SEARCH
- | LLMFamily.PERPLEXITY_RESEARCH
- | LLMFamily.PERPLEXITY_REASONING
- | LLMFamily.PERPLEXITY_DEEPSEEK
):
- raise OpenAIWorkerError(f"LLM family {self.llm_engine.llm_model.llm_family} is not supported by OpenAILLMWorker")
+ raise LLMEngineParameterError(f"LLM family {self.llm_engine.llm_model.llm_family} is not supported by OpenAILLMWorker")
except NotFoundError as exc:
- raise OpenAIWorkerError(f"OpenAI model or deployment '{self.llm_engine.llm_id}' not found: {exc}") from exc
+ raise LLMCompletionError(f"OpenAI model or deployment '{self.llm_engine.llm_id}' not found: {exc}") from exc
+ except BadRequestError as bad_request_error:
+ raise LLMCompletionError(
+ f"OpenAI bad request error with model: {self.llm_engine.llm_model.desc}:\n{bad_request_error}"
+ ) from bad_request_error
if (llm_tokens_usage := llm_job.job_report.llm_tokens_usage) and (usage := completion.usage):
llm_tokens_usage.nb_tokens_by_category = OpenAIFactory.make_nb_tokens_by_category(usage=usage)
diff --git a/pipelex/cogt/plugin/openai/xai_config.py b/pipelex/cogt/plugin/openai/xai_config.py
new file mode 100644
index 000000000..f54e25adb
--- /dev/null
+++ b/pipelex/cogt/plugin/openai/xai_config.py
@@ -0,0 +1,68 @@
+from enum import StrEnum
+from typing import Tuple
+
+from pydantic import Field
+
+from pipelex import log
+from pipelex.cogt.exceptions import CogtError
+from pipelex.tools.config.models import ConfigModel
+from pipelex.tools.environment import EnvVarNotFoundError, get_required_env
+from pipelex.tools.secrets.secrets_errors import SecretNotFoundError
+from pipelex.tools.secrets.secrets_provider_abstract import SecretsProviderAbstract
+
+
+class XaiCredentialsError(CogtError):
+ pass
+
+
+class XaiKeyMethod(StrEnum):
+ SECRET_PROVIDER = "secret_provider"
+ ENV = "env"
+
+
+XAI_API_KEY_VAR_NAME = "XAI_API_KEY"
+XAI_API_ENDPOINT_VAR_NAME = "XAI_API_ENDPOINT"
+
+
+class XaiConfig(ConfigModel):
+ api_key_method: XaiKeyMethod = Field(strict=False)
+
+ def configure(self, secrets_provider: SecretsProviderAbstract) -> Tuple[str, str]:
+ """Configure and return endpoint and API key."""
+ api_endpoint = self._get_api_endpoint(secrets_provider=secrets_provider)
+ api_key = self._get_api_key(secrets_provider=secrets_provider)
+ return api_endpoint, api_key
+
+ def _get_api_endpoint(self, secrets_provider: SecretsProviderAbstract) -> str:
+ """Get API endpoint from environment or secrets provider."""
+ match self.api_key_method:
+ case XaiKeyMethod.ENV:
+ log.debug("Getting Xai API endpoint from environment.")
+ try:
+ return get_required_env(XAI_API_ENDPOINT_VAR_NAME)
+ except EnvVarNotFoundError as exc:
+ raise XaiCredentialsError(f"Error getting Xai API endpoint from environment: {exc}") from exc
+ case XaiKeyMethod.SECRET_PROVIDER:
+ log.verbose("Getting Xai API endpoint from secrets provider.")
+ try:
+ return secrets_provider.get_secret(secret_id=XAI_API_ENDPOINT_VAR_NAME)
+ except SecretNotFoundError as exc:
+ raise XaiCredentialsError("Error getting Xai API endpoint from secrets provider.") from exc
+
+ def _get_api_key(self, secrets_provider: SecretsProviderAbstract) -> str:
+ """Get API key from environment or secrets provider."""
+ match self.api_key_method:
+ case XaiKeyMethod.ENV:
+ log.debug("Using Xai API key from environment.")
+ try:
+ key_from_env = get_required_env(XAI_API_KEY_VAR_NAME)
+ return key_from_env
+ except EnvVarNotFoundError as exc:
+ raise XaiCredentialsError(f"Error getting Xai API key from environment: {exc}") from exc
+ case XaiKeyMethod.SECRET_PROVIDER:
+ log.verbose("Using Xai API key from secrets provider.")
+ try:
+ key_from_secrets_provider = secrets_provider.get_secret(secret_id=XAI_API_KEY_VAR_NAME)
+ except SecretNotFoundError as exc:
+ raise XaiCredentialsError("Error getting Xai API key from secrets provider.") from exc
+ return key_from_secrets_provider
diff --git a/pipelex/cogt/plugin_manager.py b/pipelex/cogt/plugin_manager.py
index 55e530bc2..6415b6381 100644
--- a/pipelex/cogt/plugin_manager.py
+++ b/pipelex/cogt/plugin_manager.py
@@ -17,6 +17,7 @@ class PluginHandle(StrEnum):
BEDROCK_ASYNC = "bedrock_async"
PERPLEXITY_ASYNC = "perplexity_async"
VERTEXAI_OPENAI_ASYNC = "vertexai_openai_async"
+ XAI_OPENAI_ASYNC = "xai_openai_async"
CUSTOM_OPENAI_ASYNC = "custom_openai_async"
FAL_ASYNC = "fal_async"
@@ -39,6 +40,8 @@ class PluginHandle(StrEnum):
return PluginHandle.PERPLEXITY_ASYNC
case LLMPlatform.VERTEXAI_OPENAI:
return PluginHandle.VERTEXAI_OPENAI_ASYNC
+ case LLMPlatform.XAI:
+ return PluginHandle.XAI_OPENAI_ASYNC
case LLMPlatform.CUSTOM_OPENAI:
return PluginHandle.CUSTOM_OPENAI_ASYNC
@@ -53,6 +56,8 @@ class PluginHandle(StrEnum):
match imgg_platform:
case ImggPlatform.FAL_AI:
return PluginHandle.FAL_ASYNC
+ case ImggPlatform.OPENAI:
+ return PluginHandle.OPENAI_ASYNC
PluginManagerRoot = Dict[str, Any]
diff --git a/pipelex/core/pipe_output.py b/pipelex/core/pipe_output.py
index daac4bb2a..2b5810291 100644
--- a/pipelex/core/pipe_output.py
+++ b/pipelex/core/pipe_output.py
@@ -49,6 +49,11 @@ class PipeOutput(BaseModel):
"""Get main stuff content as TextContent if applicable."""
return self.working_memory.main_stuff_as_text
+ @property
+ def main_stuff_as_str(self) -> str:
+ """Get main stuff content as TextContent if applicable and return the text."""
+ return self.working_memory.main_stuff_as_text.text
+
@property
def main_stuff_as_image(self) -> ImageContent:
"""Get main stuff content as ImageContent if applicable."""
diff --git a/pipelex/core/working_memory.py b/pipelex/core/working_memory.py
index a3ab9cafe..d326575cb 100644
--- a/pipelex/core/working_memory.py
+++ b/pipelex/core/working_memory.py
@@ -282,6 +282,10 @@ class WorkingMemory(BaseModel):
"""Get stuff content as TextContent if applicable."""
return self.get_stuff(name=name).as_text
+ def get_stuff_as_str(self, name: str) -> str:
+ """Get stuff content as string if applicable."""
+ return self.get_stuff_as_text(name=name).text
+
def get_stuff_as_image(self, name: str) -> ImageContent:
"""Get stuff content as ImageContent if applicable."""
return self.get_stuff(name=name).as_image
diff --git a/pipelex/libraries/library_manager.py b/pipelex/libraries/library_manager.py
index ff810bff3..bb0781660 100644
--- a/pipelex/libraries/library_manager.py
+++ b/pipelex/libraries/library_manager.py
@@ -78,7 +78,7 @@ class LibraryManager:
for llm_deck_path in llm_deck_paths:
llm_deck_dict = load_toml_from_path(path=llm_deck_path)
log.debug(f"Loaded LLM deck from {llm_deck_path}")
- log.debug(llm_deck_dict)
+ log.verbose(llm_deck_dict)
deep_update(full_llm_deck_dict, llm_deck_dict)
self.llm_deck = LLMDeck.model_validate(full_llm_deck_dict)
diff --git a/pipelex/libraries/llm_deck/base_llm_deck.toml b/pipelex/libraries/llm_deck/base_llm_deck.toml
index 48710aac7..6d9a831de 100644
--- a/pipelex/libraries/llm_deck/base_llm_deck.toml
+++ b/pipelex/libraries/llm_deck/base_llm_deck.toml
@@ -7,9 +7,10 @@
# Match a llm_handle with a complete blueprint (llm_name, llm_version and llm_platform_choice).
[llm_handles]
gpt-4o-2024-08-06 = { llm_name = "gpt-4o", llm_version = "2024-08-06" }
-best-claude = "claude-3-7-sonnet"
+best-claude = "claude-4-opus"
best-gemini = "gemini-2.5-pro"
best-mistral = "mistral-large"
+best-grok = "grok-3"
####################################################################################################
# LLM Presets
diff --git a/pipelex/libraries/llm_integrations/anthropic.toml b/pipelex/libraries/llm_integrations/anthropic.toml
index be9628903..788b72a72 100644
--- a/pipelex/libraries/llm_integrations/anthropic.toml
+++ b/pipelex/libraries/llm_integrations/anthropic.toml
@@ -42,3 +42,23 @@ max_prompt_images = 100
cost_per_million_tokens_usd = { input = 3.0, output = 15.0 }
platform_llm_id = { anthropic = "claude-3-7-sonnet-20250219", bedrock_anthropic = "us.anthropic.claude-3-7-sonnet-20250219-v1:0" }
default_platform = "anthropic"
+
+
+["claude-4".claude-4-sonnet.latest]
+max_tokens = 64000
+is_gen_object_supported = true
+is_vision_supported = true
+max_prompt_images = 100
+cost_per_million_tokens_usd = { input = 3.0, output = 15.0 }
+platform_llm_id = { anthropic = "claude-sonnet-4-20250514", bedrock_anthropic = "us.anthropic.claude-sonnet-4-20250514-v1:0" }
+default_platform = "anthropic"
+
+
+["claude-4".claude-4-opus.latest]
+max_tokens = 32000
+is_gen_object_supported = true
+is_vision_supported = true
+max_prompt_images = 100
+cost_per_million_tokens_usd = { input = 3.0, output = 15.0 }
+platform_llm_id = { anthropic = "claude-opus-4-20250514", bedrock_anthropic = "us.anthropic.claude-opus-4-20250514-v1:0" }
+default_platform = "anthropic"
diff --git a/pipelex/libraries/llm_integrations/vertexai.toml b/pipelex/libraries/llm_integrations/vertexai.toml
index a90af6247..c338f2d6a 100644
--- a/pipelex/libraries/llm_integrations/vertexai.toml
+++ b/pipelex/libraries/llm_integrations/vertexai.toml
@@ -28,9 +28,16 @@ max_prompt_images = 3000
cost_per_million_tokens_usd = { input = 0.0, output = 0.0 }
platform_llm_id = { vertexai_openai = "google/gemini-2.5-pro-preview-05-06" }
-[gemini."gemini-2.5-flash".latest]
+[gemini."gemini-2.5-flash"."2025-04-17"]
is_gen_object_supported = true
is_vision_supported = true
max_prompt_images = 3000
cost_per_million_tokens_usd = { input = 0.15, output = 0.6 }
platform_llm_id = { vertexai_openai = "google/gemini-2.5-flash-preview-04-17" }
+
+[gemini."gemini-2.5-flash".latest]
+is_gen_object_supported = true
+is_vision_supported = true
+max_prompt_images = 3000
+cost_per_million_tokens_usd = { input = 0.15, output = 0.6 }
+platform_llm_id = { vertexai_openai = "google/gemini-2.5-flash-preview-05-20" }
diff --git a/pipelex/libraries/llm_integrations/xai.toml b/pipelex/libraries/llm_integrations/xai.toml
new file mode 100644
index 000000000..897b3c6a1
--- /dev/null
+++ b/pipelex/libraries/llm_integrations/xai.toml
@@ -0,0 +1,25 @@
+
+[grok-3.grok-3.latest]
+is_gen_object_supported = true
+is_vision_supported = false
+cost_per_million_tokens_usd = { input = 3, output = 15 }
+platform_llm_id = { xai = "grok-3-latest" }
+
+[grok-3.grok-3-mini.latest]
+is_gen_object_supported = true
+is_vision_supported = false
+cost_per_million_tokens_usd = { input = 0.3, output = 0.5 }
+platform_llm_id = { xai = "grok-3-mini-latest" }
+
+[grok-3.grok-3-fast.latest]
+is_gen_object_supported = true
+is_vision_supported = false
+cost_per_million_tokens_usd = { input = 5, output = 25 }
+platform_llm_id = { xai = "grok-3-fast-latest" }
+
+
+[grok-3.grok-3-mini-fast.latest]
+is_gen_object_supported = true
+is_vision_supported = false
+cost_per_million_tokens_usd = { input = 0.15, output = 4 }
+platform_llm_id = { xai = "grok-3-mini-fast-latest" }
diff --git a/pipelex/libraries/pipelines/documents.toml b/pipelex/libraries/pipelines/documents.toml
index 8dbbef66c..fba4d71c2 100644
--- a/pipelex/libraries/pipelines/documents.toml
+++ b/pipelex/libraries/pipelines/documents.toml
@@ -16,3 +16,11 @@ output = "PageContent"
pdf = "pdf"
page_images = true
page_views = false
+
+[pipe.extract_page_contents_and_views_from_pdf]
+PipeOcr = "Extract page contents from a PDF document as well aspage views"
+input = "PDF"
+output = "PageContent"
+pdf = "pdf"
+page_images = true
+page_views = true
diff --git a/pipelex/pipe_operators/pipe_img_gen.py b/pipelex/pipe_operators/pipe_img_gen.py
index 2f9fa44e6..02907e9de 100644
--- a/pipelex/pipe_operators/pipe_img_gen.py
+++ b/pipelex/pipe_operators/pipe_img_gen.py
@@ -1,40 +1,55 @@
-from typing import List, Literal, Optional, Union, cast
+from typing import List, Literal, Optional, Union
from pydantic import Field
from typing_extensions import override
from pipelex import log
from pipelex.cogt.imgg.imgg_handle import ImggHandle
-from pipelex.cogt.imgg.imgg_job_components import AspectRatio, ImggJobParams
+from pipelex.cogt.imgg.imgg_job_components import AspectRatio, Background, ImggJobParams, Quality
from pipelex.cogt.imgg.imgg_prompt import ImggPrompt
from pipelex.config import get_config
from pipelex.core.concept_native import NativeConcept
from pipelex.core.pipe_output import PipeOutput
from pipelex.core.pipe_run_params import PipeOutputMultiplicity, PipeRunParams, output_multiplicity_to_apply
-from pipelex.core.stuff_content import ImageContent, ListContent, StuffContent, TextContent
+from pipelex.core.stuff_content import ImageContent, ListContent, StuffContent
from pipelex.core.stuff_factory import StuffFactory
from pipelex.core.working_memory import WorkingMemory
-from pipelex.exceptions import PipeRunParamsError
+from pipelex.exceptions import PipeDefinitionError, PipeInputError, PipeRunParamsError, WorkingMemoryStuffNotFoundError
from pipelex.hub import get_content_generator
from pipelex.mission.job_metadata import JobMetadata
from pipelex.pipe_operators.pipe_operator import PipeOperator
+# TODO: refacto this as part of the PipeImgGen blueprint/params
+IMGG_PROMPT_NAME = "imgg_prompt"
+
class PipeImgGenOutput(PipeOutput):
@property
def image_urls(self) -> List[str]:
- items = self.main_stuff_as_items(item_type=ImageContent)
- return [item.url for item in items]
+ the_urls: List[str] = []
+ content = self.main_stuff.content
+ if isinstance(content, ListContent):
+ items = self.main_stuff_as_items(item_type=ImageContent)
+ the_urls = [item.url for item in items]
+ elif isinstance(content, ImageContent):
+ the_urls = [content.url]
+ else:
+ raise PipeRunParamsError(f"PipeImgGen output should be a ListContent or an ImageContent, got {type(content)}")
+ return the_urls
class PipeImgGen(PipeOperator):
output_concept_code: str = NativeConcept.IMAGE.code
+ imgg_prompt: Optional[str] = None
+ imgg_prompt_stuff_name: Optional[str] = None
# TODO: wrap this up in imgg llm_presets like for llm
imgg_handle: Optional[ImggHandle] = None
aspect_ratio: Optional[AspectRatio] = Field(default=None, strict=False)
nb_steps: Optional[int] = Field(default=None, gt=0)
guidance_scale: Optional[float] = Field(default=None, gt=0)
- is_safety_checker_enabled: Optional[bool] = None
+ is_moderated: Optional[bool] = None
+ background: Optional[Background] = None
+ quality: Optional[Quality] = Field(default=None, strict=False)
safety_tolerance: Optional[int] = Field(default=None, ge=1, le=6)
is_raw: Optional[bool] = None
seed: Optional[Union[int, Literal["auto"]]] = None
@@ -49,7 +64,7 @@ class PipeImgGen(PipeOperator):
output_name: Optional[str] = None,
) -> PipeImgGenOutput:
if not self.output_concept_code:
- raise ValueError("PipeImgGen should have a non-None output_concept_code")
+ raise PipeDefinitionError("PipeImgGen should have a non-None output_concept_code")
applied_output_multiplicity, _, _ = output_multiplicity_to_apply(
output_multiplicity_base=self.output_multiplicity or False,
@@ -57,11 +72,15 @@ class PipeImgGen(PipeOperator):
)
log.debug("Getting image generation prompt from context")
- imgg_prompt_stuff = working_memory.get_stuff("imgg_prompt")
- if not imgg_prompt_stuff:
- raise ValueError("imgg_prompt not found in context")
+ if self.imgg_prompt:
+ imgg_prompt_text = self.imgg_prompt
+ else:
+ stuff_name = self.imgg_prompt_stuff_name or IMGG_PROMPT_NAME
+ try:
+ imgg_prompt_text = working_memory.get_stuff_as_str(stuff_name)
+ except WorkingMemoryStuffNotFoundError as exc:
+ raise PipeInputError(f"Could not find a valid user image named '{stuff_name}' in the working_memory: {exc}") from exc
- imgg_prompt_text = cast(TextContent, imgg_prompt_stuff.content).text
imgg_config = get_config().cogt.imgg_config
imgg_param_defaults = imgg_config.imgg_param_defaults
@@ -72,11 +91,14 @@ class PipeImgGen(PipeOperator):
else:
seed = seed_setting
+ # TODO: refacto this as a model update
imgg_job_params = ImggJobParams(
- nb_steps=self.nb_steps or imgg_param_defaults.nb_steps,
aspect_ratio=self.aspect_ratio or imgg_param_defaults.aspect_ratio,
+ background=self.background or imgg_param_defaults.background,
+ quality=self.quality or imgg_param_defaults.quality,
+ nb_steps=self.nb_steps or imgg_param_defaults.nb_steps,
guidance_scale=self.guidance_scale or imgg_param_defaults.guidance_scale,
- is_safety_checker_enabled=self.is_safety_checker_enabled or imgg_param_defaults.is_safety_checker_enabled,
+ is_moderated=self.is_moderated or imgg_param_defaults.is_moderated,
safety_tolerance=self.safety_tolerance or imgg_param_defaults.safety_tolerance,
is_raw=self.is_raw or imgg_param_defaults.is_raw,
output_format=imgg_param_defaults.output_format,
diff --git a/pipelex/pipe_operators/pipe_img_gen_factory.py b/pipelex/pipe_operators/pipe_img_gen_factory.py
index ed617d2ea..dc31859c9 100644
--- a/pipelex/pipe_operators/pipe_img_gen_factory.py
+++ b/pipelex/pipe_operators/pipe_img_gen_factory.py
@@ -1,25 +1,42 @@
from typing import Any, Dict, Literal, Optional, Union
-from pydantic import Field
-from typing_extensions import override
+from pydantic import Field, model_validator
+from typing_extensions import Self, override
from pipelex.cogt.imgg.imgg_handle import ImggHandle
-from pipelex.cogt.imgg.imgg_job_components import AspectRatio
+from pipelex.cogt.imgg.imgg_job_components import AspectRatio, Quality
from pipelex.core.pipe_blueprint import PipeBlueprint, PipeSpecificFactoryProtocol
+from pipelex.exceptions import PipeDefinitionError
from pipelex.pipe_operators.pipe_img_gen import PipeImgGen
+from pipelex.tools.typing.validation_utils import has_more_than_one_among_attributes_from_lists
class PipeImgGenBlueprint(PipeBlueprint):
+ imgg_prompt: Optional[str] = None
+ imgg_prompt_stuff_name: Optional[str] = None
imgg_handle: Optional[ImggHandle] = None
aspect_ratio: Optional[AspectRatio] = Field(default=None, strict=False)
+ quality: Optional[Quality] = Field(default=None, strict=False)
nb_steps: Optional[int] = Field(default=None, gt=0)
guidance_scale: Optional[float] = Field(default=None, gt=0)
- is_safety_checker_enabled: Optional[bool] = None
+ is_moderated: Optional[bool] = None
safety_tolerance: Optional[int] = Field(default=None, ge=1, le=6)
is_raw: Optional[bool] = None
seed: Optional[Union[int, Literal["auto"]]] = None
nb_output: Optional[int] = Field(default=None, ge=1)
+ @model_validator(mode="after")
+ def validate_imgg_prompt_and_imgg_prompt_stuff_name(self) -> Self:
+ if excess_attributes_list := has_more_than_one_among_attributes_from_lists(
+ self,
+ [
+ ["imgg_prompt", "imgg_prompt_stuff_name"],
+ ["quality", "nb_steps"],
+ ],
+ ):
+ raise PipeDefinitionError(f"PipeImgGenBlueprint should have no more than one of {excess_attributes_list} among them")
+ return self
+
class PipeImgGenFactory(PipeSpecificFactoryProtocol[PipeImgGenBlueprint, PipeImgGen]):
@classmethod
@@ -38,11 +55,13 @@ class PipeImgGenFactory(PipeSpecificFactoryProtocol[PipeImgGenBlueprint, PipeImg
input_concept_code=pipe_blueprint.input,
output_concept_code=pipe_blueprint.output,
output_multiplicity=output_multiplicity,
+ imgg_prompt=pipe_blueprint.imgg_prompt,
+ imgg_prompt_stuff_name=pipe_blueprint.imgg_prompt_stuff_name,
imgg_handle=pipe_blueprint.imgg_handle,
aspect_ratio=pipe_blueprint.aspect_ratio,
nb_steps=pipe_blueprint.nb_steps,
guidance_scale=pipe_blueprint.guidance_scale,
- is_safety_checker_enabled=pipe_blueprint.is_safety_checker_enabled,
+ is_moderated=pipe_blueprint.is_moderated,
safety_tolerance=pipe_blueprint.safety_tolerance,
is_raw=pipe_blueprint.is_raw,
seed=pipe_blueprint.seed,
diff --git a/pipelex/pipe_operators/pipe_llm_factory.py b/pipelex/pipe_operators/pipe_llm_factory.py
index 4e635fbeb..acceb2d01 100644
--- a/pipelex/pipe_operators/pipe_llm_factory.py
+++ b/pipelex/pipe_operators/pipe_llm_factory.py
@@ -14,7 +14,7 @@ from pipelex.pipe_operators.pipe_jinja2_factory import PipeJinja2Factory
from pipelex.pipe_operators.pipe_llm import PipeLLM, StructuringMethod
from pipelex.pipe_operators.pipe_llm_prompt import PipeLLMPrompt
from pipelex.tools.templating.jinja2_errors import Jinja2TemplateError
-from pipelex.tools.typing.validation_utils import has_more_than_one_among_attributes_from_any_list
+from pipelex.tools.typing.validation_utils import has_more_than_one_among_attributes_from_lists
class PipeLLMBlueprint(PipeBlueprint):
@@ -45,7 +45,7 @@ class PipeLLMBlueprint(PipeBlueprint):
@model_validator(mode="after")
def validate_multiple_output(self) -> Self:
- if attributes_list := has_more_than_one_among_attributes_from_any_list(
+ if excess_attributes_list := has_more_than_one_among_attributes_from_lists(
self,
attributes_lists=[
["nb_output", "multiple_output"],
@@ -53,7 +53,7 @@ class PipeLLMBlueprint(PipeBlueprint):
["prompt", "prompt_name", "prompt_template", "template_name"],
],
):
- raise PipeDefinitionError(f"PipeLLMBlueprint should have no more than one of {attributes_list} among them")
+ raise PipeDefinitionError(f"PipeLLMBlueprint should have no more than one of {excess_attributes_list} among them")
return self
diff --git a/pipelex/pipe_operators/pipe_llm_prompt.py b/pipelex/pipe_operators/pipe_llm_prompt.py
index 938967783..5019592d7 100644
--- a/pipelex/pipe_operators/pipe_llm_prompt.py
+++ b/pipelex/pipe_operators/pipe_llm_prompt.py
@@ -130,7 +130,7 @@ class PipeLLMPrompt(PipeOperator):
try:
prompt_image_content = working_memory.get_stuff_attribute(name=user_image_name, wanted_type=ImageContent)
except (WorkingMemoryNotFoundError, WorkingMemoryStuffNotFoundError, WorkingMemoryTypeError) as exc:
- raise PipeInputError(f"A valid user image named '{user_image_name}' was not found in the working_memory: {exc}") from exc
+ raise PipeInputError(f"Could not find a valid user image named '{user_image_name}' in the working_memory: {exc}") from exc
if base_64 := prompt_image_content.base_64:
user_image = PromptImageFactory.make_prompt_image(base_64=base_64)
diff --git a/pipelex/pipelex.toml b/pipelex/pipelex.toml
index fc6409041..b4768b23b 100644
--- a/pipelex/pipelex.toml
+++ b/pipelex/pipelex.toml
@@ -107,6 +107,9 @@ api_key_method = "env"
[cogt.llm_config.perplexity_config]
api_key_method = "env"
+[cogt.llm_config.xai_config]
+api_key_method = "env"
+
[cogt.llm_config.vertexai_config]
api_key_method = "env"
@@ -117,6 +120,7 @@ api_key_method = "env"
client_method = "aioboto3"
[cogt.llm_config.anthropic_config]
+claude_4_reduced_tokens_limit = 8192 # use "unlimited" to enable the full 32/64K tokens Opus/Sonet but it raises streaming/timeout issues
api_key_method = "env"
[cogt.llm_config.custom_endpoint_config]
@@ -135,9 +139,11 @@ is_sync_mode = false
[cogt.imgg_config.imgg_param_defaults]
aspect_ratio = "square" # "square", "landscape_4_3", "landscape_16_9", "landscape_21_9", "portrait_3_4", "portrait_9_16", "portrait_9_21"
-nb_steps = 1 # 28 for Flux, one of [1,2,4,8] for SDXL Lightning
+# nb_steps = 1 # 28 for Flux, one of [1,2,4,8] for SDXL Lightning
+quality = "low"
guidance_scale = 3.5
-is_safety_checker_enabled = true
+background = "auto"
+is_moderated = true
safety_tolerance = 5
is_raw = false
output_format = "jpg"
diff --git a/pipelex/tools/templating/template_preprocessor.py b/pipelex/tools/templating/template_preprocessor.py
index 6e22cfbe9..1bef8981f 100644
--- a/pipelex/tools/templating/template_preprocessor.py
+++ b/pipelex/tools/templating/template_preprocessor.py
@@ -40,12 +40,19 @@ def replace_at_variable(match: Match[str]) -> str:
return f'{{{{ {variable}|tag("{variable}") }}}}'
+# Handle @?variable patterns (optional insertion)
+def replace_optional_at_variable(match: Match[str]) -> str:
+ variable: str = match.group(1)
+ return f'{{% if {variable} %}}{{{{ {variable}|tag("{variable}") }}}}{{% endif %}}'
+
+
# Handle $variable patterns
def replace_dollar_variable(match: Match[str]) -> str:
variable: str = match.group(1)
if variable.endswith("."):
# trailing dot can't be in a variable name so it must be a punctuation in the template sentence, so we remove it
variable = variable[:-1]
+ return f"{{{{ {variable}|format() }}}}."
return f"{{{{ {variable}|format() }}}}"
@@ -61,6 +68,12 @@ def preprocess_template(template: str) -> str:
# TODO: allow escape patterns
+ # Replace @?variable patterns (optional insertion) - must come before @variable
+ new_template = re.sub(r"@\?([a-zA-Z0-9_.]+)", replace_optional_at_variable, processed_template)
+ if new_template != processed_template:
+ changes_made = True
+ processed_template = new_template
+
# Replace @variable patterns
new_template = re.sub(r"@([a-zA-Z0-9_.]+)", replace_at_variable, processed_template)
if new_template != processed_template:
diff --git a/pipelex/tools/typing/validation_utils.py b/pipelex/tools/typing/validation_utils.py
index 544684790..e99aaf2fa 100644
--- a/pipelex/tools/typing/validation_utils.py
+++ b/pipelex/tools/typing/validation_utils.py
@@ -39,12 +39,19 @@ def has_more_than_one_among_attributes_from_list(obj: Any, attributes_list: List
return len(provided_attributes) > 1
-def has_more_than_one_among_attributes_from_any_list(obj: Any, attributes_lists: List[List[str]]) -> Optional[List[str]]:
+def has_more_than_one_among_attributes_from_lists(obj: Any, attributes_lists: List[List[str]]) -> Optional[List[str]]:
"""
- Checks if more than one attribute from any list of attributes is non-None in an object.
+ Checks if more than one attribute from lists (plural) of attributes is non-None in an object.
This function is useful for detecting conflicts in configurations or data models
where attributes are supposed to be mutually exclusive.
+
+ Args:
+ obj (Any): The object to check attributes on. Must support getattr().
+ attributes_lists (List[List[str]]): List of lists of attribute names to check.
+
+ Returns:
+ Optional[List[str]]: The list of attributes that are non-None if more than one, None otherwise.
"""
for attributes_list in attributes_lists:
if has_more_than_one_among_attributes_from_list(obj, attributes_list):
diff --git a/pyproject.toml b/pyproject.toml
index 42484034c..e8fc81734 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -20,7 +20,7 @@ dependencies = [
"aiofiles<24.0",
"filetype>=1.2.0",
"httpx>=0.27.0",
- "instructor==1.7.2",
+ "instructor>=1.8.3",
"jinja2>=3.1.4",
"json2html>=1.3.0",
"kajson==0.1.4",
@@ -61,7 +61,7 @@ dev = [
"pandas-stubs>=2.2.3.241126",
"pytest>=8.3.3",
"pytest-cov>=6.1.1",
- "pytest-pretty==1.2.0",
+ "pytest-sugar>=1.0.0",
"pytest-asyncio>=0.24.0",
"ruff>=0.6.8",
"types-aioboto3[bedrock,bedrock-runtime]>=13.4.0",
diff --git a/tests/conftest.py b/tests/conftest.py
index 0a881b93e..c3eb111e5 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -14,6 +14,8 @@ pytest_plugins = [
"pipelex.test_extras.shared_pytest_plugins",
]
+TEST_OUTPUTS_DIR = "temp/test_outputs"
+
@pytest.fixture(scope="module", autouse=True)
def reset_pipelex_config_fixture():
diff --git a/tests/pipelex/asynch/conftest.py b/tests/pipelex/asynch/conftest.py
index 2d0853d52..5ce3a3fa8 100644
--- a/tests/pipelex/asynch/conftest.py
+++ b/tests/pipelex/asynch/conftest.py
@@ -12,6 +12,7 @@ from pipelex.pipe_works.pipe_router import PipeRouter
from pipelex.pipe_works.pipe_router_protocol import PipeRouterProtocol
from pipelex.tools.misc.file_utils import get_incremental_directory_path, remove_folder
from pipelex.tools.misc.json_utils import save_as_json_to_path
+from tests.conftest import TEST_OUTPUTS_DIR
@pytest_asyncio.fixture # pyright: ignore[reportUntypedFunctionDecorator, reportUnknownMemberType]
@@ -38,7 +39,7 @@ async def pipe_result_handler(request: FixtureRequest) -> AsyncIterator[tuple[st
if not isinstance(pipe_code, str):
raise RuntimeError(f"pipe_code is not a string: {pipe_code}")
result_dir_path = get_incremental_directory_path(
- base_path="temp/unit_test_results",
+ base_path=TEST_OUTPUTS_DIR,
base_name=pipe_code,
)
activity_handler = ActivityHandlerForResultFiles(result_dir_path=result_dir_path)
diff --git a/tests/pipelex/asynch/test_pipe_imgg.py b/tests/pipelex/asynch/test_pipe_imgg.py
new file mode 100644
index 000000000..8b7fc38f4
--- /dev/null
+++ b/tests/pipelex/asynch/test_pipe_imgg.py
@@ -0,0 +1,37 @@
+import pytest
+
+from pipelex import pretty_print
+from pipelex.cogt.imgg.imgg_handle import ImggHandle
+from pipelex.core.concept_native import NativeConcept
+from pipelex.hub import get_pipe_router
+from pipelex.pipe_operators.pipe_img_gen import PipeImgGen, PipeImgGenOutput
+from pipelex.pipe_works.pipe_job_factory import PipeJobFactory
+from tests.pipelex.cogt.test_data import IMGGTestCases
+
+
[email protected](loop_scope="class")
+class TestPipeImgg:
+ @pytest.mark.parametrize("topic, image_desc", IMGGTestCases.IMAGE_DESC)
+ async def test_pipe_img_gen(
+ self,
+ imgg_handle: ImggHandle,
+ topic: str,
+ image_desc: str,
+ ):
+ pipe_job = PipeJobFactory.make_pipe_job(
+ pipe=PipeImgGen(
+ code="adhoc_for_test_pipe_img_gen",
+ domain="generic",
+ imgg_handle=imgg_handle,
+ imgg_prompt=image_desc,
+ output_concept_code=NativeConcept.IMAGE.code,
+ output_multiplicity=False,
+ ),
+ )
+ pipe_imgg_output: PipeImgGenOutput = await get_pipe_router().run_pipe_job(
+ pipe_job=pipe_job,
+ )
+ image_urls = pipe_imgg_output.image_urls[0]
+ pretty_print(image_urls, title=topic)
diff --git a/tests/cogt/__init__.py b/tests/pipelex/cogt/__init__.py
similarity index 100%
rename from tests/cogt/__init__.py
rename to tests/pipelex/cogt/__init__.py
diff --git a/tests/cogt/asynch/__init__.py b/tests/pipelex/cogt/asynch/__init__.py
similarity index 100%
rename from tests/cogt/asynch/__init__.py
rename to tests/pipelex/cogt/asynch/__init__.py
diff --git a/tests/cogt/asynch/content_generator/conftest.py b/tests/pipelex/cogt/asynch/content_generator/conftest.py
similarity index 100%
rename from tests/cogt/asynch/content_generator/conftest.py
rename to tests/pipelex/cogt/asynch/content_generator/conftest.py
diff --git a/tests/cogt/asynch/content_generator/test_content_generator.py b/tests/pipelex/cogt/asynch/content_generator/test_content_generator.py
similarity index 99%
rename from tests/cogt/asynch/content_generator/test_content_generator.py
rename to tests/pipelex/cogt/asynch/content_generator/test_content_generator.py
index e93b21900..0a60ffec8 100644
--- a/tests/cogt/asynch/content_generator/test_content_generator.py
+++ b/tests/pipelex/cogt/asynch/content_generator/test_content_generator.py
@@ -17,7 +17,7 @@ from pipelex.cogt.ocr.ocr_job_components import OcrJobConfig, OcrJobParams
from pipelex.cogt.ocr.ocr_output import OcrOutput
from pipelex.hub import get_llm_deck
from pipelex.mission.job_metadata import JobMetadata
-from tests.cogt.test_data import Employee
+from tests.pipelex.cogt.test_data import Employee
from tests.test_data import ImageTestCases
USER_TEXT_FOR_BASE = """
diff --git a/tests/cogt/asynch/imgg/__init__.py b/tests/pipelex/cogt/asynch/imgg/__init__.py
similarity index 100%
rename from tests/cogt/asynch/imgg/__init__.py
rename to tests/pipelex/cogt/asynch/imgg/__init__.py
diff --git a/tests/cogt/asynch/imgg/test_imgg.py b/tests/pipelex/cogt/asynch/imgg/test_image_gen.py
similarity index 80%
rename from tests/cogt/asynch/imgg/test_imgg.py
rename to tests/pipelex/cogt/asynch/imgg/test_image_gen.py
index 03273dcb0..23888c720 100644
--- a/tests/cogt/asynch/imgg/test_imgg.py
+++ b/tests/pipelex/cogt/asynch/imgg/test_image_gen.py
@@ -3,15 +3,15 @@ import pytest
from pipelex import pretty_print
from pipelex.cogt.imgg.imgg_job_factory import ImggJobFactory
from pipelex.hub import get_imgg_worker
-from tests.cogt.test_data import IMGGTestCases
+from tests.pipelex.cogt.test_data import IMGGTestCases
@pytest.mark.imgg
@pytest.mark.inference
@pytest.mark.asyncio(loop_scope="class")
-class TestAsyncCogtImgg:
+class TestImageGeneration:
@pytest.mark.parametrize("topic, imgg_prompt_text", IMGGTestCases.IMAGE_DESC)
- async def test_imgg_async_using_handle(self, imgg_handle: str, topic: str, imgg_prompt_text: str):
+ async def test_imgg_using_handle(self, imgg_handle: str, topic: str, imgg_prompt_text: str):
pretty_print(imgg_prompt_text, title=topic)
imgg_worker_async = get_imgg_worker(imgg_handle=imgg_handle)
imgg_job = ImggJobFactory.make_imgg_job_from_prompt_contents(
diff --git a/tests/cogt/asynch/imgg/test_imgg_fal.py b/tests/pipelex/cogt/asynch/imgg/test_imgg_fal.py
similarity index 93%
rename from tests/cogt/asynch/imgg/test_imgg_fal.py
rename to tests/pipelex/cogt/asynch/imgg/test_imgg_fal.py
index a58a7e841..3e2350bb5 100644
--- a/tests/cogt/asynch/imgg/test_imgg_fal.py
+++ b/tests/pipelex/cogt/asynch/imgg/test_imgg_fal.py
@@ -4,7 +4,7 @@ from pipelex import pretty_print
from pipelex.cogt.imgg.imgg_handle import ImggHandle
from pipelex.cogt.imgg.imgg_job_factory import ImggJobFactory
from pipelex.hub import get_imgg_worker
-from tests.cogt.test_data import IMGGTestCases
+from tests.pipelex.cogt.test_data import IMGGTestCases
@pytest.mark.imgg
diff --git a/tests/pipelex/cogt/asynch/imgg/test_imgg_openai.py b/tests/pipelex/cogt/asynch/imgg/test_imgg_openai.py
new file mode 100644
index 000000000..01b6615c7
--- /dev/null
+++ b/tests/pipelex/cogt/asynch/imgg/test_imgg_openai.py
@@ -0,0 +1,47 @@
+import pytest
+
+from pipelex.cogt.exceptions import ImggGenerationError
+from pipelex.cogt.llm.llm_models.llm_platform import LLMPlatform
+from pipelex.cogt.plugin.openai.openai_factory import OpenAIFactory
+from pipelex.tools.misc.base_64_utils import save_base64_to_binary_file
+from pipelex.tools.misc.file_utils import ensure_path, get_incremental_file_path
+from tests.conftest import TEST_OUTPUTS_DIR
+from tests.pipelex.cogt.test_data import IMGGTestCases
+
+
[email protected](loop_scope="class")
+class TestImggByOpenAIGpt:
+ @pytest.mark.parametrize("topic, image_desc", IMGGTestCases.IMAGE_DESC)
+ async def test_gpt_image_generation(self, topic: str, image_desc: str):
+ client = OpenAIFactory.make_openai_client(LLMPlatform.OPENAI)
+ result = await client.images.generate(
+ prompt=image_desc,
+ model="gpt-image-1",
+ moderation="low",
+ background="transparent",
+ quality="low",
+ size="1024x1024",
+ output_format="png",
+ output_compression=100,
+ n=2,
+ )
+ if not result.data:
+ raise ImggGenerationError("No result from OpenAI")
+
+ for image_index, image_data in enumerate(result.data):
+ image_base64 = image_data.b64_json
+ if not image_base64:
+ raise ImggGenerationError("No base64 image data received from OpenAI")
+
+ folder_path = f"{TEST_OUTPUTS_DIR}/imgg_by_gpt_image"
+ ensure_path(folder_path)
+ filename = f"{topic}_{image_index}"
+ img_path = get_incremental_file_path(
+ base_path=folder_path,
+ base_name=filename,
+ extension="png",
+ avoid_suffix_if_possible=True,
+ )
+ save_base64_to_binary_file(b64=image_base64, file_path=img_path)
diff --git a/tests/cogt/asynch/llm_async/__init__.py b/tests/pipelex/cogt/asynch/llm_async/__init__.py
similarity index 100%
rename from tests/cogt/asynch/llm_async/__init__.py
rename to tests/pipelex/cogt/asynch/llm_async/__init__.py
diff --git a/tests/cogt/asynch/llm_async/test_llm_engines.py b/tests/pipelex/cogt/asynch/llm_async/test_llm_engines.py
similarity index 95%
rename from tests/cogt/asynch/llm_async/test_llm_engines.py
rename to tests/pipelex/cogt/asynch/llm_async/test_llm_engines.py
index 16c0f4162..ffaa6474b 100644
--- a/tests/cogt/asynch/llm_async/test_llm_engines.py
+++ b/tests/pipelex/cogt/asynch/llm_async/test_llm_engines.py
@@ -11,13 +11,13 @@ from pipelex.cogt.llm.llm_models.llm_platform import LLMPlatform
from pipelex.cogt.llm.llm_worker_abstract import LLMWorkerAbstract
from pipelex.cogt.llm.llm_worker_factory import LLMWorkerFactory
from pipelex.hub import get_inference_manager, get_llm_deck, get_llm_models_provider, get_report_delegate
-from tests.cogt.test_data import LLMTestConstants, Person
+from tests.pipelex.cogt.test_data import LLMTestConstants, Person
@pytest.mark.llm
@pytest.mark.inference
@pytest.mark.asyncio(loop_scope="class")
-class TestAsyncLLMEngines:
+class TestLLMEngines:
async def run_inference(self, llm_worker: LLMWorkerAbstract, llm_job: LLMJob):
generated_text = await llm_worker.gen_text(llm_job=llm_job)
assert generated_text
@@ -45,6 +45,7 @@ class TestAsyncLLMEngines:
llm_models_provider = get_llm_models_provider()
llm_models = llm_models_provider.get_all_llm_models()
llm_worker_factory = LLMWorkerFactory()
+ count = 0
for llm_model in llm_models:
platform_llm_id = llm_model.platform_llm_id.get(llm_platform)
if llm_id != platform_llm_id:
@@ -65,6 +66,11 @@ class TestAsyncLLMEngines:
)
log.info(f"Running inference for {llm_model.name_and_version_and_platform}")
await self.run_inference(llm_worker=llm_worker, llm_job=llm_job)
+ count += 1
+ if count > 0:
+ log.info(f"Tested {count} llm_engines for llm_id '{llm_id}' on platform '{llm_platform}'")
+ else:
+ pytest.fail(f"No llm_engines found for llm_id '{llm_id}' on platform '{llm_platform}'")
async def test_llm_engines_from_one_family(self, llm_job_params: LLMJobParams, llm_family: LLMFamily):
inference_manager = get_inference_manager()
diff --git a/tests/cogt/asynch/llm_async/test_llm_gen_object.py b/tests/pipelex/cogt/asynch/llm_async/test_llm_gen_object.py
similarity index 99%
rename from tests/cogt/asynch/llm_async/test_llm_gen_object.py
rename to tests/pipelex/cogt/asynch/llm_async/test_llm_gen_object.py
index 51107cc97..e96061e9e 100644
--- a/tests/cogt/asynch/llm_async/test_llm_gen_object.py
+++ b/tests/pipelex/cogt/asynch/llm_async/test_llm_gen_object.py
@@ -8,7 +8,7 @@ from pipelex import pretty_print
from pipelex.cogt.llm.llm_job_components import LLMJobParams
from pipelex.cogt.llm.llm_job_factory import LLMJobFactory
from pipelex.hub import get_llm_deck, get_llm_worker
-from tests.cogt.test_data import LLMTestCases
+from tests.pipelex.cogt.test_data import LLMTestCases
def get_async_worker_and_job(llm_preset_id: str, user_text: str):
diff --git a/tests/cogt/asynch/llm_async/test_llm_gen_text.py b/tests/pipelex/cogt/asynch/llm_async/test_llm_gen_text.py
similarity index 98%
rename from tests/cogt/asynch/llm_async/test_llm_gen_text.py
rename to tests/pipelex/cogt/asynch/llm_async/test_llm_gen_text.py
index d882e97af..3bb51da5e 100644
--- a/tests/cogt/asynch/llm_async/test_llm_gen_text.py
+++ b/tests/pipelex/cogt/asynch/llm_async/test_llm_gen_text.py
@@ -8,7 +8,7 @@ from pipelex.cogt.llm.llm_job_components import LLMJobParams
from pipelex.cogt.llm.llm_job_factory import LLMJobFactory
from pipelex.cogt.llm.llm_models.llm_family import LLMFamily
from pipelex.hub import get_llm_deck, get_llm_worker, get_report_delegate
-from tests.cogt.test_data import LLMTestCases
+from tests.pipelex.cogt.test_data import LLMTestCases
def get_async_worker_and_job(llm_preset_id: str, user_text: str):
diff --git a/tests/cogt/asynch/llm_async/test_llm_job_async_factory.py b/tests/pipelex/cogt/asynch/llm_async/test_llm_job_async_factory.py
similarity index 97%
rename from tests/cogt/asynch/llm_async/test_llm_job_async_factory.py
rename to tests/pipelex/cogt/asynch/llm_async/test_llm_job_async_factory.py
index eff00e35f..cd40e8aa3 100644
--- a/tests/cogt/asynch/llm_async/test_llm_job_async_factory.py
+++ b/tests/pipelex/cogt/asynch/llm_async/test_llm_job_async_factory.py
@@ -7,7 +7,7 @@ from pipelex.cogt.llm.llm_job import LLMJobParams
from pipelex.cogt.llm.llm_job_factory import LLMJobFactory
from pipelex.cogt.llm.llm_prompt_template import LLMPromptTemplate
from pipelex.hub import get_llm_worker
-from tests.cogt.test_data import LLMTestConstants
+from tests.pipelex.cogt.test_data import LLMTestConstants
@pytest.mark.asyncio(loop_scope="class")
diff --git a/tests/cogt/asynch/llm_async/test_llm_report.py b/tests/pipelex/cogt/asynch/llm_async/test_llm_report.py
similarity index 97%
rename from tests/cogt/asynch/llm_async/test_llm_report.py
rename to tests/pipelex/cogt/asynch/llm_async/test_llm_report.py
index 5f85a50aa..77caef5c7 100644
--- a/tests/cogt/asynch/llm_async/test_llm_report.py
+++ b/tests/pipelex/cogt/asynch/llm_async/test_llm_report.py
@@ -6,7 +6,7 @@ import pytest
from pipelex import pretty_print
from pipelex.cogt.llm.llm_job_factory import LLMJobFactory
from pipelex.hub import get_llm_deck, get_llm_worker, get_report_delegate
-from tests.cogt.test_data import LLMTestCases
+from tests.pipelex.cogt.test_data import LLMTestCases
@pytest.mark.asyncio
diff --git a/tests/cogt/asynch/llm_async/test_llm_vision.py b/tests/pipelex/cogt/asynch/llm_async/test_llm_vision.py
similarity index 98%
rename from tests/cogt/asynch/llm_async/test_llm_vision.py
rename to tests/pipelex/cogt/asynch/llm_async/test_llm_vision.py
index 0213af168..785423f4f 100644
--- a/tests/cogt/asynch/llm_async/test_llm_vision.py
+++ b/tests/pipelex/cogt/asynch/llm_async/test_llm_vision.py
@@ -10,7 +10,7 @@ from pipelex.cogt.llm.llm_job import LLMJobParams
from pipelex.cogt.llm.llm_job_factory import LLMJobFactory
from pipelex.hub import get_llm_worker
from pipelex.tools.misc.base_64_utils import load_binary_as_base64
-from tests.cogt.test_data import LLMVisionTestCases
+from tests.pipelex.cogt.test_data import LLMVisionTestCases
@pytest.mark.llm
diff --git a/tests/cogt/asynch/llm_providers/__init__.py b/tests/pipelex/cogt/asynch/llm_providers/__init__.py
similarity index 100%
rename from tests/cogt/asynch/llm_providers/__init__.py
rename to tests/pipelex/cogt/asynch/llm_providers/__init__.py
diff --git a/tests/cogt/asynch/llm_providers/conftest.py b/tests/pipelex/cogt/asynch/llm_providers/conftest.py
similarity index 100%
rename from tests/cogt/asynch/llm_providers/conftest.py
rename to tests/pipelex/cogt/asynch/llm_providers/conftest.py
diff --git a/tests/cogt/asynch/llm_providers/test_anthropic.py b/tests/pipelex/cogt/asynch/llm_providers/test_anthropic.py
similarity index 100%
rename from tests/cogt/asynch/llm_providers/test_anthropic.py
rename to tests/pipelex/cogt/asynch/llm_providers/test_anthropic.py
diff --git a/tests/cogt/asynch/llm_providers/test_openai.py b/tests/pipelex/cogt/asynch/llm_providers/test_openai.py
similarity index 100%
rename from tests/cogt/asynch/llm_providers/test_openai.py
rename to tests/pipelex/cogt/asynch/llm_providers/test_openai.py
diff --git a/tests/cogt/asynch/ocr/test_ocr.py b/tests/pipelex/cogt/asynch/ocr/test_ocr.py
similarity index 100%
rename from tests/cogt/asynch/ocr/test_ocr.py
rename to tests/pipelex/cogt/asynch/ocr/test_ocr.py
diff --git a/tests/cogt/conftest.py b/tests/pipelex/cogt/conftest.py
similarity index 89%
rename from tests/cogt/conftest.py
rename to tests/pipelex/cogt/conftest.py
index 76829f08c..18959e70a 100644
--- a/tests/cogt/conftest.py
+++ b/tests/pipelex/cogt/conftest.py
@@ -1,6 +1,5 @@
import pytest
-from pipelex.cogt.imgg.imgg_handle import ImggHandle
from pipelex.cogt.llm.llm_job_components import LLMJobParams
from pipelex.cogt.llm.llm_models.llm_family import LLMCreator, LLMFamily
from pipelex.cogt.llm.llm_models.llm_platform import LLMPlatform
@@ -81,10 +80,12 @@ def llm_handle_for_vision(request: pytest.FixtureRequest) -> str:
@pytest.fixture(
params=[
# LLMFamily.GPT_4,
- # LLMFamily.GPT_4_1,
LLMFamily.GPT_4O,
# LLMFamily.GPT_4_5,
+ # LLMFamily.GPT_4_1,
# LLMFamily.O_SERIES,
+ # LLMFamily.CLAUDE_3_7,
+ # LLMFamily.CLAUDE_4,
# LLMFamily.PERPLEXITY_SEARCH,
# LLMFamily.PERPLEXITY_REASONING,
# LLMFamily.PERPLEXITY_RESEARCH,
@@ -116,6 +117,7 @@ def llm_creator(request: pytest.FixtureRequest) -> LLMCreator:
return request.param
+# TODO: build llm_id/platform combos dynalically from config data
@pytest.fixture(
params=[
# LLMPlatform.ANTHROPIC,
@@ -127,6 +129,7 @@ def llm_creator(request: pytest.FixtureRequest) -> LLMCreator:
# LLMPlatform.PERPLEXITY,
# LLMPlatform.VERTEXAI_OPENAI,
# LLMPlatform.CUSTOM_OPENAI,
+ # LLMPlatform.XAI,
]
)
def llm_platform(request: pytest.FixtureRequest) -> LLMPlatform:
@@ -139,12 +142,20 @@ def llm_platform(request: pytest.FixtureRequest) -> LLMPlatform:
"gpt-4o-mini",
# "open-mixtral-8x7b",
# "google/gemini-2.0-flash",
- # "google/gemini-2.5-pro-exp-03-25",
+ # "google/gemini-2.5-pro-preview-05-06",
+ # "google/gemini-2.5-flash-preview-04-17",
+ # "google/gemini-2.5-flash-preview-05-20",
# "o1",
# "o4-mini",
# "bedrock-mistral-large",
# "sonar",
# "claude-3-7-sonnet",
+ # "claude-4-sonnet",
+ # "claude-4-opus",
+ # "us.anthropic.claude-sonnet-4-20250514-v1:0",
+ # "us.anthropic.claude-opus-4-20250514-v1:0",
+ # "sonar",
+ # "sonar-pro",
# "gemma3:4b",
# "llama4:scout",
]
@@ -154,19 +165,6 @@ def llm_id(request: pytest.FixtureRequest) -> str:
return request.param
- params=[
- # ImggHandle.FLUX_1_PRO_LEGACY,
- # ImggHandle.FLUX_1_1_PRO,
- # ImggHandle.FLUX_1_1_ULTRA,
- ImggHandle.SDXL_LIGHTNING,
- ]
-)
-def imgg_handle(request: pytest.FixtureRequest) -> ImggHandle:
- assert isinstance(request.param, ImggHandle)
- return request.param
-
-
@pytest.fixture(
params=[
LLMJobParams(
diff --git a/tests/cogt/synchro/__init__.py b/tests/pipelex/cogt/synchro/__init__.py
similarity index 100%
rename from tests/cogt/synchro/__init__.py
rename to tests/pipelex/cogt/synchro/__init__.py
diff --git a/tests/cogt/synchro/llm_providers/__init__.py b/tests/pipelex/cogt/synchro/llm_providers/__init__.py
similarity index 100%
rename from tests/cogt/synchro/llm_providers/__init__.py
rename to tests/pipelex/cogt/synchro/llm_providers/__init__.py
diff --git a/tests/cogt/synchro/llm_providers/conftest.py b/tests/pipelex/cogt/synchro/llm_providers/conftest.py
similarity index 100%
rename from tests/cogt/synchro/llm_providers/conftest.py
rename to tests/pipelex/cogt/synchro/llm_providers/conftest.py
diff --git a/tests/cogt/synchro/llm_providers/test_bedrock.py b/tests/pipelex/cogt/synchro/llm_providers/test_bedrock.py
similarity index 100%
rename from tests/cogt/synchro/llm_providers/test_bedrock.py
rename to tests/pipelex/cogt/synchro/llm_providers/test_bedrock.py
diff --git a/tests/cogt/synchro/llm_providers/test_mistral.py b/tests/pipelex/cogt/synchro/llm_providers/test_mistral.py
similarity index 100%
rename from tests/cogt/synchro/llm_providers/test_mistral.py
rename to tests/pipelex/cogt/synchro/llm_providers/test_mistral.py
diff --git a/tests/cogt/synchro/serde/__init__.py b/tests/pipelex/cogt/synchro/serde/__init__.py
similarity index 100%
rename from tests/cogt/synchro/serde/__init__.py
rename to tests/pipelex/cogt/synchro/serde/__init__.py
diff --git a/tests/cogt/synchro/serde/conftest.py b/tests/pipelex/cogt/synchro/serde/conftest.py
similarity index 100%
rename from tests/cogt/synchro/serde/conftest.py
rename to tests/pipelex/cogt/synchro/serde/conftest.py
diff --git a/tests/cogt/synchro/serde/test_serde_llm_classes.py b/tests/pipelex/cogt/synchro/serde/test_serde_llm_classes.py
similarity index 100%
rename from tests/cogt/synchro/serde/test_serde_llm_classes.py
rename to tests/pipelex/cogt/synchro/serde/test_serde_llm_classes.py
diff --git a/tests/cogt/synchro/test_llm_model_provider.py b/tests/pipelex/cogt/synchro/test_llm_model_provider.py
similarity index 100%
rename from tests/cogt/synchro/test_llm_model_provider.py
rename to tests/pipelex/cogt/synchro/test_llm_model_provider.py
diff --git a/tests/cogt/synchro/test_setup_workers.py b/tests/pipelex/cogt/synchro/test_setup_workers.py
similarity index 100%
rename from tests/cogt/synchro/test_setup_workers.py
rename to tests/pipelex/cogt/synchro/test_setup_workers.py
diff --git a/tests/cogt/test_data.py b/tests/pipelex/cogt/test_data.py
similarity index 96%
rename from tests/cogt/test_data.py
rename to tests/pipelex/cogt/test_data.py
index 6f8bc7181..57f2785ad 100644
--- a/tests/cogt/test_data.py
+++ b/tests/pipelex/cogt/test_data.py
@@ -86,6 +86,7 @@ class LLMVisionTestCases:
class LLMTestConstants:
USER_TEXT_SHORT = "In one sentence, who is Bill Gates?"
+ # USER_TEXT_SHORT = "What's the biggest football match tonight in Europe?"
PROMPT_TEMPLATE_TEXT = "Can you give one example of flower which is {color} in color ?"
PROMPT_COLOR_EXAMPLES: ClassVar[List[str]] = [
"red",
@@ -138,11 +139,10 @@ class IMGGTestCases:
IMGG_PROMPT_3 = """
Woman typing on a laptop. On the laptop screen you see python code to generate code to write a prompt for an AI model.
"""
- IMGG_PROMPT_4 = "a dog wearing sunglasses and playing poker"
IMAGE_DESC: ClassVar[List[Tuple[str, str]]] = [ # topic, imgg_prompt_text
# (IMGG_PROMPT_1, IMGG_PROMPT_1),
# (IMGG_PROMPT_2, IMGG_PROMPT_2),
# (IMGG_PROMPT_3, IMGG_PROMPT_3),
- (IMGG_PROMPT_4, IMGG_PROMPT_4),
+ ("coding girl", "a girl with a dragon tatoo, coding in python"),
]
diff --git a/tests/pipelex/conftest.py b/tests/pipelex/conftest.py
new file mode 100644
index 000000000..7ebc84104
--- /dev/null
+++ b/tests/pipelex/conftest.py
@@ -0,0 +1,17 @@
+import pytest
+
+from pipelex.cogt.imgg.imgg_handle import ImggHandle
+
+
+ params=[
+ ImggHandle.FLUX_1_PRO_LEGACY,
+ ImggHandle.FLUX_1_1_PRO,
+ ImggHandle.FLUX_1_1_ULTRA,
+ ImggHandle.SDXL_LIGHTNING,
+ ImggHandle.OPENAI_GPT_IMAGE_1,
+ ]
+)
+def imgg_handle(request: pytest.FixtureRequest) -> ImggHandle:
+ assert isinstance(request.param, ImggHandle)
+ return request.param
diff --git a/tests/tools/templating/test_template_preprocessor.py b/tests/tools/templating/test_template_preprocessor.py
new file mode 100644
index 000000000..ba72b0d44
--- /dev/null
+++ b/tests/tools/templating/test_template_preprocessor.py
@@ -0,0 +1,82 @@
+from pipelex.tools.templating.template_preprocessor import preprocess_template
+
+
+class TestTemplatePreprocessor:
+ """Test the template preprocessing functionality."""
+
+ def test_at_variable_pattern(self):
+ """Test basic @variable pattern replacement."""
+ template = "@expense\n@invoices"
+ result = preprocess_template(template)
+ expected = '{{ expense|tag("expense") }}\n{{ invoices|tag("invoices") }}'
+ assert result == expected
+
+ def test_dollar_variable_pattern(self):
+ """Test basic $variable pattern replacement."""
+ template = "Your goal is to summarize everything related to $topic"
+ result = preprocess_template(template)
+ expected = "Your goal is to summarize everything related to {{ topic|format() }}"
+ assert result == expected
+
+ def test_dollar_variable_with_trailing_dot(self):
+ """Test $variable pattern with trailing dot."""
+ template = "The value is $amount."
+ result = preprocess_template(template)
+ expected = "The value is {{ amount|format() }}."
+ assert result == expected
+
+ def test_optional_at_variable_pattern(self):
+ """Test @?variable pattern for optional insertion."""
+ template = "Here is the data:\n@?optional_field\nEnd of data."
+ result = preprocess_template(template)
+ expected = 'Here is the data:\n{% if optional_field %}{{ optional_field|tag("optional_field") }}{% endif %}\nEnd of data.'
+ assert result == expected
+
+ def test_optional_at_variable_with_dots(self):
+ """Test @?variable pattern with dots in variable name."""
+ template = "@?user.profile.bio"
+ result = preprocess_template(template)
+ expected = '{% if user.profile.bio %}{{ user.profile.bio|tag("user.profile.bio") }}{% endif %}'
+ assert result == expected
+
+ def test_mixed_patterns(self):
+ """Test mixing all patterns: @?, @, and $."""
+ template = """Summary for $name:
+
+@?description
+
+@details
+
+Optional notes:
+@?notes"""
+ result = preprocess_template(template)
+ expected = """Summary for {{ name|format() }}:
+
+{% if description %}{{ description|tag("description") }}{% endif %}
+
+{{ details|tag("details") }}
+
+Optional notes:
+{% if notes %}{{ notes|tag("notes") }}{% endif %}"""
+ assert result == expected
+
+ def test_no_replacement_needed(self):
+ """Test template with no special patterns."""
+ template = "This is a plain template with no special syntax."
+ result = preprocess_template(template)
+ assert result == template
+
+ def test_complex_variable_names(self):
+ """Test patterns with complex variable names."""
+ template = "@item_1\n$price_2\n@?metadata_3"
+ result = preprocess_template(template)
+ expected = '{{ item_1|tag("item_1") }}\n{{ price_2|format() }}\n{% if metadata_3 %}{{ metadata_3|tag("metadata_3") }}{% endif %}'
+ assert result == expected
+
+ def test_optional_pattern_priority(self):
+ """Test that @? pattern is processed before @ pattern."""
+ # This ensures @? doesn't get matched as @ followed by ?
+ template = "@?optional @required"
+ result = preprocess_template(template)
+ expected = '{% if optional %}{{ optional|tag("optional") }}{% endif %} {{ required|tag("required") }}'
+ assert result == expected
diff --git a/uv.lock b/uv.lock
index 36c14e9f2..131db01ef 100644
--- a/uv.lock
+++ b/uv.lock
@@ -62,7 +62,7 @@ wheels = [
[[package]]
name = "aiohttp"
-version = "3.12.4"
+version = "3.12.6"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "aiohappyeyeballs" },
@@ -73,59 +73,59 @@ dependencies = [
{ name = "propcache" },
{ name = "yarl" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/57/77/92b356837fad83cc5709afc0b6e21dce65a413293fed15e6999bafdf36b0/aiohttp-3.12.4.tar.gz", hash = "sha256:d8229b412121160740f5745583c786f3f494d2416fe5f76aabd815da6ab6b193", size = 7781788, upload-time = "2025-05-29T01:36:57.715Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e9/5e/bd16acce20e07e01d7db8f9a5102714f90928f87ec9cb248db642893ebdf/aiohttp-3.12.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6cfe7a78ed06047420f7709b9ae438431ea2dc50a9c00960a4b996736f1a70a3", size = 702194, upload-time = "2025-05-29T01:34:25.982Z" },
- { url = "https://files.pythonhosted.org/packages/65/1d/cc50b39ca7a24c28e5e79ec7c5a3682c84af76d814f2e1284e1aa473122c/aiohttp-3.12.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1188186a118a6793b1e510399f5deb2dcab9643af05fd5217f7f5b067b863671", size = 474473, upload-time = "2025-05-29T01:34:28.245Z" },
- { url = "https://files.pythonhosted.org/packages/52/6b/bf1ff91cb6eda30964c29a7fbe2a294db00724ceab344696eeebfe4c9ccf/aiohttp-3.12.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d54362f38f532869553a38328931f5f150f0f4fdbee8e122da447663a86552c5", size = 462734, upload-time = "2025-05-29T01:34:29.887Z" },
- { url = "https://files.pythonhosted.org/packages/7c/c3/846872117cc6db1db1b86d20119a3132b8519144d5e710c2e066d07cac86/aiohttp-3.12.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4299504448f37ea9803e6ec99295d7a84a66e674300daa51ca69cace8b7ae31a", size = 1732930, upload-time = "2025-05-29T01:34:31.576Z" },
- { url = "https://files.pythonhosted.org/packages/d0/bd/df557ee83c3e36945499317b9f51dab642c17c779c939fe2df4c0307b85e/aiohttp-3.12.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1972bac2ee5dc283ccee3d58501bba08599d58dad6dbbbf58da566dc1a3ac039", size = 1681599, upload-time = "2025-05-29T01:34:33.59Z" },
- { url = "https://files.pythonhosted.org/packages/1b/b9/e043c06325300644fed7685f904323ecf937adc99971ac229ab97b0769d2/aiohttp-3.12.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a286d40eb51d2908130b4e64ca8ae1a1fdf20657ef564eea2556255d52e2147b", size = 1780391, upload-time = "2025-05-29T01:34:35.474Z" },
- { url = "https://files.pythonhosted.org/packages/6c/98/a43da221916db0b9567914e41de5a7e008904b9301540614feab2a03ee45/aiohttp-3.12.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:94650ff81e7370ceb79272914be8250558d595864cb0cc3e9c6932a16738e33b", size = 1819437, upload-time = "2025-05-29T01:34:37.458Z" },
- { url = "https://files.pythonhosted.org/packages/bb/9d/e315bdfc2e8ba0382699e686330b588f135189c51df79689e6a843513eb0/aiohttp-3.12.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03a2ca7b7e9436ae933d89d41f21ef535f21dcdc883820544102ddda63b595c2", size = 1721898, upload-time = "2025-05-29T01:34:39.297Z" },
- { url = "https://files.pythonhosted.org/packages/c1/a4/8250493ab4e540df5a3672e5d01c28ca71fd31b4a9afc217c9678ca350e3/aiohttp-3.12.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea47b02ec80408bed4d59b3b824b44514173e4ebd0bc04a901ffd12084142451", size = 1658974, upload-time = "2025-05-29T01:34:41.114Z" },
- { url = "https://files.pythonhosted.org/packages/94/d3/06c8ba3afb270afa44ffb6cf3fb0a44502be347f0fc7fdce290a60760197/aiohttp-3.12.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:41a6ea58ed974e67d75b39536997d81288a04844d8162194d3947cbff52b093d", size = 1707245, upload-time = "2025-05-29T01:34:43.002Z" },
- { url = "https://files.pythonhosted.org/packages/da/5c/d889d8edca8cdb6bb0ff9cfa58b3977320186050c8cfe2f4ceeee149b498/aiohttp-3.12.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:d563387ae8966b6668162698a66495c5d72ce864405a7dfc6cc9c4bc851a63ce", size = 1702405, upload-time = "2025-05-29T01:34:44.904Z" },
- { url = "https://files.pythonhosted.org/packages/e9/db/809ac0c7fa7ddfad33ab888fe3c83aecbfc7f03e44f387a70c20a0a096b7/aiohttp-3.12.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:b853c7f7664742d48c57f382ebae5c76efa7f323569c6d93866795092485deec", size = 1682593, upload-time = "2025-05-29T01:34:46.792Z" },
- { url = "https://files.pythonhosted.org/packages/35/85/9e1f9c7f0b0f70dfae55932c1f080230f885f84137132efc639e98611347/aiohttp-3.12.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:5d74f5fadbab802c598b440b4aecfeadc99194535d87db5764b732a52a0527fb", size = 1776193, upload-time = "2025-05-29T01:34:49.155Z" },
- { url = "https://files.pythonhosted.org/packages/83/12/b6b7b9c2d08c5346473878575195468a585041daa816ffbd97156c960ed0/aiohttp-3.12.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f5065674d38b4a738f38b344429e3688fdcccc9d2d5ec50ca03af5dbf91307e", size = 1796654, upload-time = "2025-05-29T01:34:51.588Z" },
- { url = "https://files.pythonhosted.org/packages/b7/09/0500ae6b1174abc74ab1a7a36033ecffc11e46e47a23487d75fa00d04b46/aiohttp-3.12.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:567db7411a004acd82be2499c10a22e06d4acb51929ce353a62f02f61d005e1c", size = 1709713, upload-time = "2025-05-29T01:34:53.579Z" },
- { url = "https://files.pythonhosted.org/packages/7b/55/8f5faa6e13c51609430081b42c39eb12006c9fb9111eeaedca0f3f574d3b/aiohttp-3.12.4-cp311-cp311-win32.whl", hash = "sha256:4bc000b0eee7c4b8fdc13349ab106c4ff15e6f6c1afffb04a8f5af96f1b89af3", size = 419713, upload-time = "2025-05-29T01:34:55.368Z" },
- { url = "https://files.pythonhosted.org/packages/6a/a9/97e318bfb3fc7a0cffc9dee9f0ec77db5339207887f5f4ebe1a11ecd5f32/aiohttp-3.12.4-cp311-cp311-win_amd64.whl", hash = "sha256:44f1cb869916ba52b7876243b6bb7841430846b66b61933b8e96cfaf44515b78", size = 444103, upload-time = "2025-05-29T01:34:57.133Z" },
- { url = "https://files.pythonhosted.org/packages/6c/9a/767c8f6520d0ad023d6b975f8fda71b506f64ad597bb7bd16fa5ac1562ca/aiohttp-3.12.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:7947933c67eb33f51076cabf99f9977260329759d66c4d779c6b8e35c71a96bf", size = 693297, upload-time = "2025-05-29T01:34:58.922Z" },
- { url = "https://files.pythonhosted.org/packages/82/a1/21eddeee169306c974095183c8820a807c3f05dbefcd6b674a52d18e4090/aiohttp-3.12.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:bb046723c90db9ecba67549ab5614707168ba7424742cfab40c198d8d75176e4", size = 467909, upload-time = "2025-05-29T01:35:00.746Z" },
- { url = "https://files.pythonhosted.org/packages/0d/fc/17093fe2d7e4287218fb99b18a6106b0e1fad8a95f974066f8b5fefb0fbc/aiohttp-3.12.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5fe52157c5e160eac99bb3589c2f29186d233fc83f6f42315c828f7e115f87f5", size = 460750, upload-time = "2025-05-29T01:35:03.193Z" },
- { url = "https://files.pythonhosted.org/packages/f8/4f/6ea71dd61725bdaa9437f1a9f032781c5d869046651ad43a93d769855298/aiohttp-3.12.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5bf2015822cf7177957b8573a5997c3a00b93cd2f40aa8f5155649014563bd8", size = 1707546, upload-time = "2025-05-29T01:35:05.059Z" },
- { url = "https://files.pythonhosted.org/packages/cc/79/a91f52b0d4e4462ebf37b176164d0f26b065f80f7db1dfe9b44fd9e8f8ac/aiohttp-3.12.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:db28a058b837c2a8cbebd0fae78299a41691694e536bb2ad77377bd4978b8372", size = 1690196, upload-time = "2025-05-29T01:35:07.045Z" },
- { url = "https://files.pythonhosted.org/packages/d5/e2/5682bfb2583b55f23d785084bf2237339ebebe73cc0734fa8848d33a270c/aiohttp-3.12.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac155f380e100825fe2ae59b5d4e297fea98d90f5b7df5b27a9096992d8672dd", size = 1745291, upload-time = "2025-05-29T01:35:09.648Z" },
- { url = "https://files.pythonhosted.org/packages/90/1d/5016430fa2ed0d58ca6d6b0f4a1f929c353f72996c95ec33882cd18ed867/aiohttp-3.12.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2de98a1fa249d35f05a6a7525e5823260e8b0c252d72c9cf39d0f945c38da0c7", size = 1791444, upload-time = "2025-05-29T01:35:12.427Z" },
- { url = "https://files.pythonhosted.org/packages/2b/49/33fd3f82ff187b6d982633962afad24bb459ee1cd357399b7545c8e6ed98/aiohttp-3.12.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4c2de2077ee70b93015b4a74493964d891e730d238371c8d4b70413be36b0cf", size = 1710885, upload-time = "2025-05-29T01:35:15Z" },
- { url = "https://files.pythonhosted.org/packages/d5/11/e895cb33fca34cec9aa375615ba0d4810a3be601962066444b07a90bc306/aiohttp-3.12.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:058199018d700883c86c473814fb0ecabb4e3ae39bafcbc77ed2c94199e5affb", size = 1626686, upload-time = "2025-05-29T01:35:17.76Z" },
- { url = "https://files.pythonhosted.org/packages/b2/e9/3c98778dbda7cb4c94ddada97cb9ea6d7d5140b487a0444817f8b6a94697/aiohttp-3.12.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b6586aaccf46bc5ae05598fcd09a26fbc9186284eb2551d3262f31a8ec79a463", size = 1687746, upload-time = "2025-05-29T01:35:19.754Z" },
- { url = "https://files.pythonhosted.org/packages/45/7b/fdb43d32ac2819e181e1339aae1bc7acb87e47452af64409181a2bce2426/aiohttp-3.12.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ededddd6fcc8f4403135609d7fb4bc1c1300464ff8fd57fb097b08cc136f18ea", size = 1709199, upload-time = "2025-05-29T01:35:21.752Z" },
- { url = "https://files.pythonhosted.org/packages/bb/d9/b7a37bed158bd4aced1585b89082a8642e516f5b08637d7d15971f61ba31/aiohttp-3.12.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:158495f1d1858c07cc691624ccc92498410edfa57900452948f7eb6bc1be4c39", size = 1649853, upload-time = "2025-05-29T01:35:24.718Z" },
- { url = "https://files.pythonhosted.org/packages/42/4f/7e4d1c52f6e15c59e2f3154d9431a029aab558735e94fec85602207fee8a/aiohttp-3.12.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:41c064200045c344850688b4d7723ebf163b92bfc7c216c29a938d1051385c1c", size = 1729413, upload-time = "2025-05-29T01:35:26.847Z" },
- { url = "https://files.pythonhosted.org/packages/94/83/2987339271a4d8915370614d0bd6b26b7e50d905adf7398636a278ca059a/aiohttp-3.12.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:0834ec8491451780a2a05b0f3a83675911bb0804273ceafcd282bff2548ed962", size = 1757386, upload-time = "2025-05-29T01:35:29.605Z" },
- { url = "https://files.pythonhosted.org/packages/d2/27/3d0fc578531820d166e51024e86b8d35feaa828aa961909396f7cce7a191/aiohttp-3.12.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2a81e4ebbc8d9fb6748046577525ada0c5292606ced068ec9ab3aa6d653bf5d9", size = 1716999, upload-time = "2025-05-29T01:35:32.138Z" },
- { url = "https://files.pythonhosted.org/packages/a9/87/1b5466145a55ebf6145eea5e58e5311653946e518e6e04d971acbae81b09/aiohttp-3.12.4-cp312-cp312-win32.whl", hash = "sha256:73cf6ed61849769dce058a6945d7c63da0798e409494c9ca3fddf5b526f7aee4", size = 414443, upload-time = "2025-05-29T01:35:34.07Z" },
- { url = "https://files.pythonhosted.org/packages/70/0c/c11464953fff9c005e700e060b98436960d85bb60104af868bf5ebec6ace/aiohttp-3.12.4-cp312-cp312-win_amd64.whl", hash = "sha256:1e29de2afbe9c777ff8c58900e19654bf435069535a3a182a50256c8cd3eea17", size = 440544, upload-time = "2025-05-29T01:35:35.895Z" },
- { url = "https://files.pythonhosted.org/packages/b3/c5/acc9a65cd92b263050dcc2986e2aee598fc6f3e0b251c9ce7138bf9f387c/aiohttp-3.12.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:789e9ddd591a3161a4e222942e10036d3fb4477464d9a454be2613966b0bce6b", size = 687716, upload-time = "2025-05-29T01:35:37.749Z" },
- { url = "https://files.pythonhosted.org/packages/3b/8b/c36084efb762c8b388e35b564c5c87d287e4d24a77422f7570e36f8195f4/aiohttp-3.12.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8eb37972e6aebe4cab53b0008c4ca7cd412f3f01872f255763ac4bb0ce253d83", size = 465372, upload-time = "2025-05-29T01:35:39.701Z" },
- { url = "https://files.pythonhosted.org/packages/d0/d5/c390226c7f0a2a0e4a7477fb293d311157092231fdb7ab79eb8ad325b3b0/aiohttp-3.12.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ca6af3e929de2c2d3272680437ee5b1e32fa4ac1fb9dfdcc06f5441542d06110", size = 457673, upload-time = "2025-05-29T01:35:42.458Z" },
- { url = "https://files.pythonhosted.org/packages/bc/1a/fdf6ade28154d249b605a6e85f7eb424363618ebcb35f93a7f837fd1f9c9/aiohttp-3.12.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a9b8b482be5c81ceee91fecead2c82b7bec7cfb8b81c0389d6fa4cd82f3bb53", size = 1696485, upload-time = "2025-05-29T01:35:44.489Z" },
- { url = "https://files.pythonhosted.org/packages/71/02/1670b62c82d6e19c77df235b96a56ec055eb40d63b6feff93146544d0224/aiohttp-3.12.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b3f9d7c7486f28cc0fd6bfe5b9accc4ecfe3d4f0471ec53e08aa610e5642dbf3", size = 1677750, upload-time = "2025-05-29T01:35:47.567Z" },
- { url = "https://files.pythonhosted.org/packages/af/eb/75c9863328a9f1f7200ebadf0fefec3a50a2f31e9ccf489faf9c132b87ad/aiohttp-3.12.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e42986c6fc949926bcf0928b5440e6adf20b9a14c04dd9ea5e3ba9c7bbd4433a", size = 1729821, upload-time = "2025-05-29T01:35:49.98Z" },
- { url = "https://files.pythonhosted.org/packages/8a/ac/75ef05d10aae033d9bc87d0eea35d904e505c0a7a5d7c7838d1d8b63e954/aiohttp-3.12.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:58dded319d52e63ea3c40dbae3f44c1264fa4bb692845b7ff8ce1ddc9319fce3", size = 1779191, upload-time = "2025-05-29T01:35:52.257Z" },
- { url = "https://files.pythonhosted.org/packages/b3/5e/36e5957a073dddb69ed37e5ffa8581548d5d7b9d00daa4ba98fff6c85219/aiohttp-3.12.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1102668bf8c4b744528ef0b5bdaeeb17930832653d1ed9558ab59a0fae91dcf9", size = 1701521, upload-time = "2025-05-29T01:35:54.413Z" },
- { url = "https://files.pythonhosted.org/packages/4e/98/16c3dc7c2534d5109f02da5c88e34e327d8ceddb9b976b4861d787461a59/aiohttp-3.12.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e46c5ad27747416ef0a914da2ad175d9066d8d011960f7b66c9b4f02ef7acfcc", size = 1615227, upload-time = "2025-05-29T01:35:56.595Z" },
- { url = "https://files.pythonhosted.org/packages/74/cb/87eaf79aa41a6bc99c3dd1219caf190f282b5742647bf3abb7b66b7eb221/aiohttp-3.12.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cbcde696c4d4d07b616e10f942e183f90a86ff65e27a03c338067deb1204b148", size = 1668248, upload-time = "2025-05-29T01:36:00.295Z" },
- { url = "https://files.pythonhosted.org/packages/d6/04/2ff57af92f76b0973652710bf9a539d66eb78b4cddace90fc39a5b04bdd7/aiohttp-3.12.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:002e027d4840cb187e5ba6889043e1e90ed114ef8e798133d51db834696a6de2", size = 1699915, upload-time = "2025-05-29T01:36:02.599Z" },
- { url = "https://files.pythonhosted.org/packages/15/d6/0d9916e03cebd697b3c4fc48998733188e8b834368e727b46650a3a1b005/aiohttp-3.12.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cf12c660159897cebdd3ab377550b3563218286f33a57f56753018b1897796ae", size = 1642508, upload-time = "2025-05-29T01:36:05.236Z" },
- { url = "https://files.pythonhosted.org/packages/83/b4/9cf887a3d2cf58828ac6a076d240171d6196dcf7d1edafcb005103f457fb/aiohttp-3.12.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c9e3db6a3c3e53e48b3324eb40e7c5da2a4c78cdcd3ac4e7d7945876dd421de1", size = 1718642, upload-time = "2025-05-29T01:36:07.362Z" },
- { url = "https://files.pythonhosted.org/packages/e5/b0/266567f3c5232e211f1c9bea121a05d115a3f7761c7029ff4ee4f88e6fba/aiohttp-3.12.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e10365dcf61a7c5ed9287c4e20edc0d7a6cc09faf042d7dc570f16ed3291c680", size = 1752113, upload-time = "2025-05-29T01:36:09.519Z" },
- { url = "https://files.pythonhosted.org/packages/61/f9/58b3ce002d1b0b3630ccd02ecbfc6932d00242eb40182e76a65ddbf6ec26/aiohttp-3.12.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c20421e165410bb632f64c5693b1f69e6911dbde197fa0dcd3a0c65d505f776b", size = 1701004, upload-time = "2025-05-29T01:36:11.692Z" },
- { url = "https://files.pythonhosted.org/packages/ee/7c/c1a5e7704fef91f115bd399e47b9613cf11c8caec041a326e966f190c994/aiohttp-3.12.4-cp313-cp313-win32.whl", hash = "sha256:834a2f08eb800af07066af9f26eda4c2d6f7fe0737a3c0aef448f1ba8132fed9", size = 413468, upload-time = "2025-05-29T01:36:13.876Z" },
- { url = "https://files.pythonhosted.org/packages/65/31/e252246332a12abf17f66c8f8360730a5a3a1dd354ca48ccfb90bbb122db/aiohttp-3.12.4-cp313-cp313-win_amd64.whl", hash = "sha256:4c78018c4e8118efac767d5d91c3565919c7e021762c4644198ec5b8d426a071", size = 439411, upload-time = "2025-05-29T01:36:16.365Z" },
+sdist = { url = "https://files.pythonhosted.org/packages/23/28/2d96dffe4deb40faa7f5615b4aa96c87528e65837d8cb5385da4aecf1c07/aiohttp-3.12.6.tar.gz", hash = "sha256:37b1c6034a1e14764adad1829cd710543b1699d7985e1d336f0aa52a2dd76ba9", size = 7784449, upload-time = "2025-05-31T05:57:37.486Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/07/f0/313bd623a40638ed65eddd930fbee3a81efd9c87441ea117067beb66b7e8/aiohttp-3.12.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ed4db015494a6d0acaadce035531f9fb321afab2075a4b348811e4f7795e87e6", size = 702633, upload-time = "2025-05-31T05:55:06.348Z" },
+ { url = "https://files.pythonhosted.org/packages/07/59/cd70b7798b5f6c13c65a692dbbbeacf4c085a9ce05a34363c4413384d895/aiohttp-3.12.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:59e19517abef2af49cff79b8a863497036ff401051c79d6a3b6149a48213a7be", size = 474917, upload-time = "2025-05-31T05:55:07.982Z" },
+ { url = "https://files.pythonhosted.org/packages/74/89/fe980184d1313669f731d7f32ce824a3ee1af50b4fe83fe723fcb56ca425/aiohttp-3.12.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d557918fefb29884335e1a257df6c961f35ba1caf8eddaabad762b3436cf87ff", size = 463178, upload-time = "2025-05-31T05:55:10.061Z" },
+ { url = "https://files.pythonhosted.org/packages/cb/2a/abe1c72f9b6959b5459f8b99bcdb661a7c2de7901b0c541c26996dd70006/aiohttp-3.12.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e4fb0d7f221c36ed8469c1d2d9a2bb6a27b543cf90aa46ca701f63fb83dd7ed", size = 1733367, upload-time = "2025-05-31T05:55:12.177Z" },
+ { url = "https://files.pythonhosted.org/packages/61/e2/992378c6b1e1b4beed78044ce5b70b749c269cc6e42472fc878339f90f4e/aiohttp-3.12.6-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:deddf6b1c83ce518a156b7597a0d7a1a7ec5c1d2c973ba3f1a23f18fa2b7d65e", size = 1682037, upload-time = "2025-05-31T05:55:14.661Z" },
+ { url = "https://files.pythonhosted.org/packages/64/11/620be3270f913c8d5ae4e9a88fa5ce80b7a7848324506da8b2916053f5f0/aiohttp-3.12.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eefd98dd043c33c45123c56a79c6c39acb628304337c90f16f33569cc3aa4ba6", size = 1780829, upload-time = "2025-05-31T05:55:16.324Z" },
+ { url = "https://files.pythonhosted.org/packages/c7/92/475e7c1781aa0907671b66355ae414f0d479f0bcf0929469ea44678b72c1/aiohttp-3.12.6-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:efbbde2297e4ab10d187103aba9b565277c85ac7d24d98cae201c033ce885504", size = 1819873, upload-time = "2025-05-31T05:55:18.565Z" },
+ { url = "https://files.pythonhosted.org/packages/70/04/9f4ad736af830d68dbd376db17f7294c648af393ec24a148bcd5cc2112c1/aiohttp-3.12.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a74a566872f41247774980334e5b0309dac11b402e188bde6db8a57de4506cd", size = 1722335, upload-time = "2025-05-31T05:55:20.789Z" },
+ { url = "https://files.pythonhosted.org/packages/76/da/5ec4f8deacc4107bf95590d285879f4054d62ff9300a96d8abb4b1143384/aiohttp-3.12.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24d19cbd1d21d207ee855500d2033f1852b4d2113a741246ff62eb16a3921306", size = 1659410, upload-time = "2025-05-31T05:55:22.662Z" },
+ { url = "https://files.pythonhosted.org/packages/85/38/30df9eedcfe28265f1efb1bfe9b19cc94c5a37aea5d2cd246dde8c8080e3/aiohttp-3.12.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:86fb0a5762f936606dcab1ca248f5053587a598ed44825f4744ce3c53ae9a2e9", size = 1707684, upload-time = "2025-05-31T05:55:24.428Z" },
+ { url = "https://files.pythonhosted.org/packages/e9/4c/c8d375fa9b6ea5c381747e5e56bc0249d33bb12c5d7171d4c1b4fcae02b4/aiohttp-3.12.6-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:d7ff55a38fc9851fa5cff41b30605534dfe4d57d02f79447abfed01499fe31d3", size = 1702843, upload-time = "2025-05-31T05:55:26.661Z" },
+ { url = "https://files.pythonhosted.org/packages/1e/3c/73b6e184df80ebc5ec07c6e9d398713c40091f6cf4a5e75eb93972ee35d6/aiohttp-3.12.6-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:545f89c389a47bac024655b5676658f35f80b0d007e4c3c7ff865d9aa3bf343a", size = 1683031, upload-time = "2025-05-31T05:55:28.469Z" },
+ { url = "https://files.pythonhosted.org/packages/9d/5a/827ca828af26ceeda69459c2848fc58e76adbbea0ad9994429ae885d1a33/aiohttp-3.12.6-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:25dac87ee297e2b5826ce8e96c7615ebe7a1613856b1614a207e3376b776021b", size = 1776629, upload-time = "2025-05-31T05:55:30.314Z" },
+ { url = "https://files.pythonhosted.org/packages/d6/07/8b9081655c08807fa49134b209eddc823e7501bbcf6b044f48a01f30a504/aiohttp-3.12.6-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c1d8a4a5a7e28d8b9ec815ffecca8712b71130a4eee1c5b45e9f2cc4975f3f7c", size = 1797092, upload-time = "2025-05-31T05:55:32.072Z" },
+ { url = "https://files.pythonhosted.org/packages/5d/18/c761b934543512077c3de8d8f383bcafd94ada30c83273ea6ceeeda8aa2c/aiohttp-3.12.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bc4be1d8d68a62859f74f9ada9e174791895366601ce66342f54478d3518c8b3", size = 1710149, upload-time = "2025-05-31T05:55:33.959Z" },
+ { url = "https://files.pythonhosted.org/packages/e0/ba/730f75a17b613f2ecc336b698259140bbd439d8f7b14eae10aea14158085/aiohttp-3.12.6-cp311-cp311-win32.whl", hash = "sha256:a057680218430231eb6ab644d166b7ef398b3ffbac0232f4f789cdce9391400e", size = 420141, upload-time = "2025-05-31T05:55:36.196Z" },
+ { url = "https://files.pythonhosted.org/packages/df/71/8aaff029d07b15f7f79c484ca9b10f34cf8466d8dc4b13ecf32cc46b8de0/aiohttp-3.12.6-cp311-cp311-win_amd64.whl", hash = "sha256:8a88046a5adddf5d99f15a1920f6b8f659f46a4cfb5bfabbd668d06df045df7a", size = 444534, upload-time = "2025-05-31T05:55:37.955Z" },
+ { url = "https://files.pythonhosted.org/packages/e2/71/d4534c305623ba4e759caa381a5902713284f1ee52163d14894e60b3d254/aiohttp-3.12.6-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:cfbf8ed94b57e3b5a886bfe2a530c8eb067064cc4419fd94431a2cbeeddec54c", size = 693736, upload-time = "2025-05-31T05:55:39.705Z" },
+ { url = "https://files.pythonhosted.org/packages/0c/f4/0e4c010b669ef7418fcd5249edc1671bd07492be7989699b92cbc65e19c2/aiohttp-3.12.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:012ea107092d4465aeeb681d5b2fb8b51a847a72f0b71906f40876419fba1355", size = 468347, upload-time = "2025-05-31T05:55:41.617Z" },
+ { url = "https://files.pythonhosted.org/packages/b0/6e/6bc969bab1d4790548220b7bd061b711f246b708d7d8a6d88a0ecb04154c/aiohttp-3.12.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cdb03da5ecf74a331511604f3cf91563bf29127eabb28f4e16d390a73cb826da", size = 461191, upload-time = "2025-05-31T05:55:43.384Z" },
+ { url = "https://files.pythonhosted.org/packages/0a/56/de7ac8b49ce179618ede56f01f0050f75a270f3d9eb5d6905793e331a7d7/aiohttp-3.12.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ca81cb1e41d251cc193164409c0bbb0175e696a9997491a10db9171a2f70603", size = 1707982, upload-time = "2025-05-31T05:55:45.512Z" },
+ { url = "https://files.pythonhosted.org/packages/43/dd/74d8f791bf7832077ce5f7592126a64c6de57849182f730bb75dc7030ee7/aiohttp-3.12.6-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:15817882d25e840aba85d1f5706a7128350b81050f8ca9dabfc25a5f521a792c", size = 1690630, upload-time = "2025-05-31T05:55:47.323Z" },
+ { url = "https://files.pythonhosted.org/packages/10/f2/c5e96be25dd3efd0fe4b21a0c583fffadbadfc85f039cc0dd013e08bdc07/aiohttp-3.12.6-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db5c402ea0aed10af2e54e5946bf32f3ebb02a7604eaaa4c41a608053889de4a", size = 1745727, upload-time = "2025-05-31T05:55:49.661Z" },
+ { url = "https://files.pythonhosted.org/packages/ad/19/6fb117cf46a99d302405012f05faf67e7ebae925e8ba5a0948f5c046a7b4/aiohttp-3.12.6-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ea77675818fd8cac28491d0d59582e5e2e5b14dbf5e21bef797aa5b23b5ca8b", size = 1791881, upload-time = "2025-05-31T05:55:51.623Z" },
+ { url = "https://files.pythonhosted.org/packages/78/2f/cdde703cbfd281aca8679b75289c3cde865a541efc593354e50c5c6b7c01/aiohttp-3.12.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c232720190ca4240c15abefc7b765e987ef88df44d2384612890db87b33898f3", size = 1711323, upload-time = "2025-05-31T05:55:53.531Z" },
+ { url = "https://files.pythonhosted.org/packages/e8/a1/edfdfe7ea9160f1bbf7bd00964da45ac290a5d19661761098eefa95ac400/aiohttp-3.12.6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a2f3c974874bd0c76dfdcc60db5a6f96ca023a85318a5ac401603baa7e299272", size = 1627125, upload-time = "2025-05-31T05:55:55.404Z" },
+ { url = "https://files.pythonhosted.org/packages/5e/f0/de34cad1d44c6a7e4bffef9d42f982a28a4cdce8815733134aceb542be1d/aiohttp-3.12.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:25de52753386b0c16d5acd2153e7819f52c9e7fc05f5eca804adc174e99b735d", size = 1688185, upload-time = "2025-05-31T05:55:57.262Z" },
+ { url = "https://files.pythonhosted.org/packages/c7/46/e486289bc0a52d2cc4b87091de7428c4c4ddc76465c1aaa22eb953b8bcb7/aiohttp-3.12.6-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:3cc06a99e065ed7e766d2cd574671428261c1b8f30fedfbd91ab3c738fd9c08d", size = 1709637, upload-time = "2025-05-31T05:55:59.2Z" },
+ { url = "https://files.pythonhosted.org/packages/1f/f2/fe3d3955a2c9e78c308783ef0b1b53e5a3b56beb87133a52584e8dda52c0/aiohttp-3.12.6-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:aac87d78f55057ab48ddcc43055620546d40bbc0888d2658d8705d183c98f901", size = 1650291, upload-time = "2025-05-31T05:56:01.663Z" },
+ { url = "https://files.pythonhosted.org/packages/1c/68/2b425bd8031666be7db81e37918a9b3a9898e02b8d7e672737b05c55e2c5/aiohttp-3.12.6-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:de83f567e31418fd7bc22c5a03526a2b0a82e68c7a7fec23ef91a398228f559b", size = 1729852, upload-time = "2025-05-31T05:56:03.952Z" },
+ { url = "https://files.pythonhosted.org/packages/10/40/a14b0cf78531d504391a311c3e7c190f230cbf7dba5d4ccfbf53a5d121e5/aiohttp-3.12.6-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:fd1d6116c1364ab00ffed1654a01091dc7f897d315c5103bcc6e5ab7f70172c7", size = 1757824, upload-time = "2025-05-31T05:56:06.219Z" },
+ { url = "https://files.pythonhosted.org/packages/25/1d/250baf6961354772bf7447bb280dffa2df15c08875e535cf6a735a41373e/aiohttp-3.12.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:58f79b376a426961418df1d08656ec3a01494b7ba81824ae629e6636deddfff7", size = 1717436, upload-time = "2025-05-31T05:56:08.67Z" },
+ { url = "https://files.pythonhosted.org/packages/dc/43/9b9204284c08c244d89c69e3e556dfd7757e0393d4ef20a9238bf2643795/aiohttp-3.12.6-cp312-cp312-win32.whl", hash = "sha256:561f545dc062e6c31fc53535d8584c06516bda2fc37821a67a61b69202061e71", size = 414878, upload-time = "2025-05-31T05:56:11.081Z" },
+ { url = "https://files.pythonhosted.org/packages/fe/c1/8561f01a6386a7ecdc54aefff155aae51a349c98c04b1325619e12049fbc/aiohttp-3.12.6-cp312-cp312-win_amd64.whl", hash = "sha256:d83ab494eb583ba691af9d4d7c073987526bb9f73aa5a19907258ef3a1e39e8a", size = 440981, upload-time = "2025-05-31T05:56:13.434Z" },
+ { url = "https://files.pythonhosted.org/packages/be/5d/4db8a8972642779aa981aae2d71d88106a12f3f6a8354725ef4dbcf31a70/aiohttp-3.12.6-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7487f707a4b8167394f6afefa690198300d8a618505583eb536b92202bdec24d", size = 688139, upload-time = "2025-05-31T05:56:15.85Z" },
+ { url = "https://files.pythonhosted.org/packages/9b/b0/f0326159505f05a32e0dd858ca4770bdeb97900797d80ece9e8031f87c76/aiohttp-3.12.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9dd9211229fa2f474da01d42fafff196f607a63aaf12d8b34928c43a713eb6d5", size = 465812, upload-time = "2025-05-31T05:56:17.859Z" },
+ { url = "https://files.pythonhosted.org/packages/d1/3c/4abaf69965a63aac3bf3c9054c58b1eef68d6cf520ffeb593ed47e590da1/aiohttp-3.12.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3331ef09dd775302aa5f4d3170bd46659ad018843fab3656f5e72e3ff68df21f", size = 458109, upload-time = "2025-05-31T05:56:19.814Z" },
+ { url = "https://files.pythonhosted.org/packages/98/5f/8603860deada8e84ac5954bc736428ef370f8dd600b266c7d8177eea69ad/aiohttp-3.12.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c88ed8c54f7fd6102ef711d24710454707cde4bb3ffdec09982dcb3cb966a3e1", size = 1696923, upload-time = "2025-05-31T05:56:21.82Z" },
+ { url = "https://files.pythonhosted.org/packages/ec/40/209bb8dbb0b03f5758b7de70f86b7ac6acd8450a9bc4b4128cc5e89a20b2/aiohttp-3.12.6-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:148ffa6b2b825ff8520844ce23df9e2a5b969bb6917c4e35a832fbaa025d260d", size = 1678187, upload-time = "2025-05-31T05:56:23.898Z" },
+ { url = "https://files.pythonhosted.org/packages/26/bf/faa89212e33b6c6ba5913bd7319942f2955f0d199b7c6097896bac35ad6c/aiohttp-3.12.6-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8da054804352e974f4349fb871b07c8ffa1978e64cfb455e88fbe6fbe4d6dcb", size = 1730257, upload-time = "2025-05-31T05:56:25.909Z" },
+ { url = "https://files.pythonhosted.org/packages/d9/0c/02df1921239913d91a74563547d8e1c79ec6caa052d0bddfbc48e09708a4/aiohttp-3.12.6-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7d162c4f87f9dcdc7151f6329438de96beb527820381e3159ce08544c57e9ced", size = 1779630, upload-time = "2025-05-31T05:56:27.962Z" },
+ { url = "https://files.pythonhosted.org/packages/d8/d0/c72d6b5a204291bbae5ae38fc367df9df11ce32dca6dcca6355d469c9c13/aiohttp-3.12.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da073f88270aa434ef16a78c21a4269c96c68badc2b9ad5011fa175c06143eee", size = 1701959, upload-time = "2025-05-31T05:56:30.079Z" },
+ { url = "https://files.pythonhosted.org/packages/b4/b1/2e2cc4bb3de9d0b185a5c5b6b9d04e3a37c79e52529c634a962ca7a22bfe/aiohttp-3.12.6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2e026a9f9ac0df70f14ca5dcaf1f83a55b678e51aa6515d710dd879d2691fd7", size = 1615662, upload-time = "2025-05-31T05:56:32.473Z" },
+ { url = "https://files.pythonhosted.org/packages/bc/55/00c119c8ce2d65879b7b6d64b5a344df3ee8845f0d2a11d190376c9e7256/aiohttp-3.12.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5b700cf48fd04b4328965d1afe01f835fe6cdecc3b85ca2d950431e5cc0647f7", size = 1668684, upload-time = "2025-05-31T05:56:34.94Z" },
+ { url = "https://files.pythonhosted.org/packages/b8/be/59bc7538ccaff6fe9cf0b3a27f976d8b2729150b700dc37beef71705f009/aiohttp-3.12.6-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:38af291559401d13eb90259ba79ef6ac537ae6b5bdb1251604606a88cd0fd5e0", size = 1700350, upload-time = "2025-05-31T05:56:37.076Z" },
+ { url = "https://files.pythonhosted.org/packages/a2/3c/bcfc532cf09755c5d094e320ba7e9e7a6b977d6487b211278a5d400d0649/aiohttp-3.12.6-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:6860351cfba0196db2edc387cfeddaf1dae443e55f261ea2bcb77fecb33aae34", size = 1642945, upload-time = "2025-05-31T05:56:39.182Z" },
+ { url = "https://files.pythonhosted.org/packages/44/27/ebc660cb7624ce8d6b71486490478bb52784074cc46f5fed8fbf5f0306d2/aiohttp-3.12.6-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:06f20adcdc4f383aeb7ce884705faea44c0376cde5cdee4d32ef62d6cb1f97cc", size = 1719080, upload-time = "2025-05-31T05:56:42.065Z" },
+ { url = "https://files.pythonhosted.org/packages/81/6e/fd000fa2708cb3b887c0fe8a144f926ca34960a80ed1c44d3606027fd831/aiohttp-3.12.6-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:a52aa39eb1160775a6e80e3025c990e8872c8927c5dd4b51304788bc149b9549", size = 1752550, upload-time = "2025-05-31T05:56:44.932Z" },
+ { url = "https://files.pythonhosted.org/packages/ee/2d/5a0bd6d09ea38fcb3ec683425b25946156b99ab451c69ef84ea3d03b6eaf/aiohttp-3.12.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:52ce7e90ee9dd25bcd2ed4513e650cc4f9a03bef07a39193b82fb58892004bd6", size = 1701441, upload-time = "2025-05-31T05:56:47.326Z" },
+ { url = "https://files.pythonhosted.org/packages/bd/7b/db64cfd8fd522de73b803b600d967cc2821250f82ba97892a90c4f7e204e/aiohttp-3.12.6-cp313-cp313-win32.whl", hash = "sha256:259269870d9783de87c0430760b2498b770201ead3e11ee86761d268ce5d196a", size = 413900, upload-time = "2025-05-31T05:56:50.172Z" },
+ { url = "https://files.pythonhosted.org/packages/7f/d6/4680e3601edf5ec0e1e56cca7746f0de9b9758a33b88067b1935e95f7005/aiohttp-3.12.6-cp313-cp313-win_amd64.whl", hash = "sha256:938afd243c9ee76a6d78fad10ecca14b88b48b71553e0e9c74b8098efff5ddf8", size = 439844, upload-time = "2025-05-31T05:56:52.32Z" },
]
[[package]]
@@ -215,16 +215,16 @@ wheels = [
[[package]]
name = "boto3-stubs"
-version = "1.38.26"
+version = "1.38.27"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "botocore-stubs" },
{ name = "types-s3transfer" },
{ name = "typing-extensions", marker = "python_full_version < '3.12'" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/1e/89/9e2658210ac11459405ed8c82f47be533a5d16ae3b8203c90564b7a738a0/boto3_stubs-1.38.26.tar.gz", hash = "sha256:492e59e42323de43018ffa6d00d3bb2b93d1fead042e76c6a68fd0a0c0fe3236", size = 99065, upload-time = "2025-05-29T19:47:49.383Z" }
+sdist = { url = "https://files.pythonhosted.org/packages/e5/f1/e917a83c6c86a42fa09f1e20d2d4f9af2de8fedcf88a5f2297ae11236e4a/boto3_stubs-1.38.27.tar.gz", hash = "sha256:8a45f32b83d29ec3db28b37ea68ea5f179b141863211497ef92ba18e2a896aec", size = 99063, upload-time = "2025-05-30T19:42:34.374Z" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/48/51/881ac3c7ebeefdfe0e712b1f4d815261707a492187ea301506168cf6fc20/boto3_stubs-1.38.26-py3-none-any.whl", hash = "sha256:3022b2a8f6925c60c9ce68c5e090ff9fd2bad0c918300395a1c242681a67c11c", size = 68669, upload-time = "2025-05-29T19:47:42.352Z" },
+ { url = "https://files.pythonhosted.org/packages/ae/70/3d8921e287660757d60b023fd18887950b6ddd44ce48c0ffd9f6632c1ac3/boto3_stubs-1.38.27-py3-none-any.whl", hash = "sha256:87e6c47b76173df91f55387a91fd1f382f130821e4492e14748fe49d46598bc5", size = 68668, upload-time = "2025-05-30T19:42:29.384Z" },
]
[[package]]
@@ -243,14 +243,14 @@ wheels = [
[[package]]
name = "botocore-stubs"
-version = "1.38.26"
+version = "1.38.27"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "types-awscrt" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/08/f2/fd2f5a8ef00bbcfe00c12b8c49e247510266929dff5578b6fec360967a21/botocore_stubs-1.38.26.tar.gz", hash = "sha256:3bbf7662fc97e28a50dc959752619cf57029194987268b4dc13df4e54767204c", size = 42315, upload-time = "2025-05-29T20:18:25.22Z" }
+sdist = { url = "https://files.pythonhosted.org/packages/26/9c/9db9fc6099d866bcbc891ed9e41782003cba0662acb598f2ab6e8fb0c7c1/botocore_stubs-1.38.27.tar.gz", hash = "sha256:58315d1318b79d8f8bd2888b1587d90fa4ffa6100a58b610946110e88570b995", size = 42317, upload-time = "2025-05-30T20:17:56.477Z" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/28/4a/f99ef1ff37620c0c23aa67e3d9de5fce0f98b38fd26e6d30438ee440c0fc/botocore_stubs-1.38.26-py3-none-any.whl", hash = "sha256:c86ac7d2c7e24ea50a866a9686a293dfe8b40281cc3465d79e2e0e48d35ad93b", size = 65628, upload-time = "2025-05-29T20:18:23.125Z" },
+ { url = "https://files.pythonhosted.org/packages/c7/cb/c7789395e7e7dc6da0e963d83286818960870250f2073acb374f78d453fb/botocore_stubs-1.38.27-py3-none-any.whl", hash = "sha256:408158a72199d0611b6c91043e3d654171e974b89b94007cc10488f192e0a20f", size = 65627, upload-time = "2025-05-30T20:17:54.311Z" },
]
[[package]]
@@ -627,7 +627,7 @@ wheels = [
[[package]]
name = "instructor"
-version = "1.7.2"
+version = "1.8.3"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "aiohttp" },
@@ -642,9 +642,9 @@ dependencies = [
{ name = "tenacity" },
{ name = "typer" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/63/ba/692739c76959191aa7e5f0fccda871b36548355f4a09c8733687e64e62b0/instructor-1.7.2.tar.gz", hash = "sha256:6c01b2b159766df24865dc81f7bf8457cbda88a3c0bbc810da3467d19b185ed2", size = 66200177, upload-time = "2024-12-26T09:04:57.209Z" }
+sdist = { url = "https://files.pythonhosted.org/packages/a9/54/927c2093dc5e532195baf849f7ff1376ad673222b5d37be19e4e73af618e/instructor-1.8.3.tar.gz", hash = "sha256:04d64ebc0d6e5eee104f4715b18fac1a02c21757ae6ce76efa65d38cbd536b0b", size = 69265823, upload-time = "2025-05-22T16:44:02.409Z" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/c5/82/fd319382c1a33d7021cf151007b4cbd5daddf09d9ca5fb670e476668f9fc/instructor-1.7.2-py3-none-any.whl", hash = "sha256:cb43d27f6d7631c31762b936b2fcb44d2a3f9d8a020430a0f4d3484604ffb95b", size = 71353, upload-time = "2024-12-26T09:04:51.023Z" },
+ { url = "https://files.pythonhosted.org/packages/07/76/0e198373f182020559b0886d0d61dd2ddca109ab7a9eddf5458ff759d51a/instructor-1.8.3-py3-none-any.whl", hash = "sha256:a2c5066458132dc50ec6faa87cab9a2dd6b11b3f45c0e563a2ef704892286945", size = 94619, upload-time = "2025-05-22T16:43:58.529Z" },
]
[[package]]
@@ -1239,7 +1239,7 @@ dev = [
{ name = "pytest" },
{ name = "pytest-asyncio" },
{ name = "pytest-cov" },
- { name = "pytest-pretty" },
+ { name = "pytest-sugar" },
{ name = "ruff" },
{ name = "types-aioboto3", extra = ["bedrock", "bedrock-runtime"] },
{ name = "types-aiofiles" },
@@ -1272,7 +1272,7 @@ requires-dist = [
{ name = "filetype", specifier = ">=1.2.0" },
{ name = "google-auth-oauthlib", marker = "extra == 'google'", specifier = ">=1.2.1" },
{ name = "httpx", specifier = ">=0.27.0" },
- { name = "instructor", specifier = "==1.7.2" },
+ { name = "instructor", specifier = ">=1.8.3" },
{ name = "jinja2", specifier = ">=3.1.4" },
{ name = "json2html", specifier = ">=1.3.0" },
{ name = "kajson", specifier = "==0.1.4" },
@@ -1291,7 +1291,7 @@ requires-dist = [
{ name = "pytest", marker = "extra == 'dev'", specifier = ">=8.3.3" },
{ name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.24.0" },
{ name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=6.1.1" },
- { name = "pytest-pretty", marker = "extra == 'dev'", specifier = "==1.2.0" },
+ { name = "pytest-sugar", marker = "extra == 'dev'", specifier = ">=1.0.0" },
{ name = "python-dotenv", specifier = ">=1.0.1" },
{ name = "pyyaml", specifier = ">=6.0.2" },
{ name = "rich", specifier = ">=13.8.1" },
@@ -1566,16 +1566,17 @@ wheels = [
]
[[package]]
-name = "pytest-pretty"
-version = "1.2.0"
+name = "pytest-sugar"
+version = "1.0.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
+ { name = "packaging" },
{ name = "pytest" },
- { name = "rich" },
+ { name = "termcolor" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/a5/18/30ad0408295f3157f7a4913f0eaa51a0a377ebad0ffa51ff239e833c6c72/pytest_pretty-1.2.0.tar.gz", hash = "sha256:105a355f128e392860ad2c478ae173ff96d2f03044692f9818ff3d49205d3a60", size = 6542, upload-time = "2023-04-05T17:11:50.917Z" }
+sdist = { url = "https://files.pythonhosted.org/packages/f5/ac/5754f5edd6d508bc6493bc37d74b928f102a5fff82d9a80347e180998f08/pytest-sugar-1.0.0.tar.gz", hash = "sha256:6422e83258f5b0c04ce7c632176c7732cab5fdb909cb39cca5c9139f81276c0a", size = 14992, upload-time = "2024-02-01T18:30:36.735Z" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/bf/fe/d44d391312c1b8abee2af58ee70fabb1c00b6577ac4e0bdf25b70c1caffb/pytest_pretty-1.2.0-py3-none-any.whl", hash = "sha256:6f79122bf53864ae2951b6c9e94d7a06a87ef753476acd4588aeac018f062036", size = 6180, upload-time = "2023-04-05T17:11:49.801Z" },
+ { url = "https://files.pythonhosted.org/packages/92/fb/889f1b69da2f13691de09a111c16c4766a433382d44aa0ecf221deded44a/pytest_sugar-1.0.0-py3-none-any.whl", hash = "sha256:70ebcd8fc5795dc457ff8b69d266a4e2e8a74ae0c3edc749381c64b5246c8dfd", size = 10171, upload-time = "2024-02-01T18:30:29.395Z" },
]
[[package]]
@@ -1778,6 +1779,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/e5/30/643397144bfbfec6f6ef821f36f33e57d35946c44a2352d3c9f0ae847619/tenacity-9.1.2-py3-none-any.whl", hash = "sha256:f77bf36710d8b73a50b2dd155c97b870017ad21afe6ab300326b0371b3b05138", size = 28248, upload-time = "2025-04-02T08:25:07.678Z" },
]
+[[package]]
+name = "termcolor"
+version = "3.1.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ca/6c/3d75c196ac07ac8749600b60b03f4f6094d54e132c4d94ebac6ee0e0add0/termcolor-3.1.0.tar.gz", hash = "sha256:6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970", size = 14324, upload-time = "2025-04-30T11:37:53.791Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/4f/bd/de8d508070629b6d84a30d01d57e4a65c69aa7f5abe7560b8fad3b50ea59/termcolor-3.1.0-py3-none-any.whl", hash = "sha256:591dd26b5c2ce03b9e43f391264626557873ce1d379019786f99b0c2bee140aa", size = 7684, upload-time = "2025-04-30T11:37:52.382Z" },
+]
+
[[package]]
name = "toml"
version = "0.10.2"
@@ -1963,14 +1973,14 @@ wheels = [
[[package]]
name = "types-networkx"
-version = "3.4.2.20250527"
+version = "3.5.0.20250531"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "numpy" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/d4/b7/23d8a8b4118857749206e4cb184f060f1c9c3b12e594c835bad1946c771c/types_networkx-3.4.2.20250527.tar.gz", hash = "sha256:484914f0dee6ce8d87bda494f641a9227e954d716d2f330bfcbf69c2431b646d", size = 63063, upload-time = "2025-05-27T03:05:21.842Z" }
+sdist = { url = "https://files.pythonhosted.org/packages/4c/85/fa621cd74f0613a7710d8987fd4fd7c5287de6f32e8c46268803328acb6a/types_networkx-3.5.0.20250531.tar.gz", hash = "sha256:e8e9adfd0cdb7255e822d029163d1ef651e12cae4a3c767198b8f3e899118ca7", size = 64325, upload-time = "2025-05-31T03:04:25.244Z" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/fc/de/51f3bbb96dfddd38bc67d2282bbbd5a97861ba196f36d03449eed97a0cb1/types_networkx-3.4.2.20250527-py3-none-any.whl", hash = "sha256:3716f750e61bf46ceba2a43474d7f9b61f306274a243cee6cc2aa9f4fb37ab41", size = 147791, upload-time = "2025-05-27T03:05:20.313Z" },
+ { url = "https://files.pythonhosted.org/packages/ed/ae/ee58b15d1f8bd4fe142d3c28213c9c45feefa993a77536733903d9d42fcf/types_networkx-3.5.0.20250531-py3-none-any.whl", hash = "sha256:84a3163c802a430a90003444eb37a7a2e59206125e5a308f5ccb00434333d2f4", size = 150419, upload-time = "2025-05-31T03:04:23.977Z" },
]
[[package]]