mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
committed by
GitHub
parent
0dfe3bcb0a
commit
5d8f8cbc79
@@ -1,8 +1,5 @@
|
||||
from typing import Any, Optional, Type
|
||||
|
||||
import instructor
|
||||
from litellm import completion
|
||||
|
||||
|
||||
class InternalInstructor:
|
||||
"""Class that wraps an agent llm with instructor."""
|
||||
@@ -28,6 +25,10 @@ class InternalInstructor:
|
||||
if self.agent and not self.llm:
|
||||
self.llm = self.agent.function_calling_llm or self.agent.llm
|
||||
|
||||
# Lazy import
|
||||
import instructor
|
||||
from litellm import completion
|
||||
|
||||
self._client = instructor.from_litellm(
|
||||
completion,
|
||||
mode=instructor.Mode.TOOLS,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from litellm.integrations.custom_logger import CustomLogger
|
||||
|
||||
from crewai.agents.agent_builder.utilities.base_token_process import TokenProcess
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user