mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
feat: enhance InternalInstructor to support multiple LLM providers (#3767)
* feat: enhance InternalInstructor to support multiple LLM providers - Updated InternalInstructor to conditionally create an instructor client based on the LLM provider. - Introduced a new method _create_instructor_client to handle client creation using the modern from_provider pattern. - Added functionality to extract the provider from the LLM model name. - Implemented tests for InternalInstructor with various LLM providers including OpenAI, Anthropic, Gemini, and Azure, ensuring robust integration and error handling. This update improves flexibility and extensibility for different LLM integrations. * fix test
This commit is contained in:
@@ -902,7 +902,8 @@ def test_agent_step_callback():
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_agent_function_calling_llm():
|
||||
llm = "gpt-4o"
|
||||
from crewai.llm import LLM
|
||||
llm = LLM(model="gpt-4o", is_litellm=True)
|
||||
|
||||
@tool
|
||||
def learn_about_ai() -> str:
|
||||
|
||||
Reference in New Issue
Block a user