Skip to content

Commit

Permalink
Merge pull request #376 from PrefectHQ/fix-union
Browse files Browse the repository at this point in the history
Remove model typing due to validation error
  • Loading branch information
jlowin authored Nov 5, 2024
2 parents dc428d6 + 8621c1e commit 321c872
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/controlflow/llm/rules.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import textwrap
from typing import Optional
from typing import Any, Optional, Union

from langchain_anthropic import ChatAnthropic
from langchain_openai import AzureChatOpenAI, ChatOpenAI
from pydantic import Field

from controlflow.llm.models import BaseChatModel
from controlflow.utilities.general import ControlFlowModel, unwrap
Expand All @@ -17,7 +18,7 @@ class LLMRules(ControlFlowModel):
necessary.
"""

model: Optional[BaseChatModel]
model: Any

# require at least one non-system message
require_at_least_one_message: bool = False
Expand Down Expand Up @@ -54,7 +55,7 @@ def model_instructions(self) -> Optional[list[str]]:
class OpenAIRules(LLMRules):
require_message_name_format: str = r"[^a-zA-Z0-9_-]"

model: ChatOpenAI
model: Any

def model_instructions(self) -> list[str]:
instructions = []
Expand Down

0 comments on commit 321c872

Please sign in to comment.