Skip to content

Commit

Permalink
Remove model typing due to validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
jlowin committed Nov 5, 2024
1 parent dc428d6 commit 8621c1e
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 8621c1e

Please sign in to comment.