mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-05 17:22:36 +00:00
Add support for custom parameters for LLM
This commit is contained in:
@@ -136,6 +136,7 @@ class LLM:
|
||||
api_version: Optional[str] = None,
|
||||
api_key: Optional[str] = None,
|
||||
callbacks: List[Any] = [],
|
||||
**custom_params: Dict[str, Any],
|
||||
):
|
||||
self.model = model
|
||||
self.timeout = timeout
|
||||
@@ -156,6 +157,7 @@ class LLM:
|
||||
self.api_key = api_key
|
||||
self.callbacks = callbacks
|
||||
self.context_window_size = 0
|
||||
self.custom_params = custom_params
|
||||
|
||||
litellm.drop_params = True
|
||||
|
||||
@@ -237,6 +239,7 @@ class LLM:
|
||||
"api_key": self.api_key,
|
||||
"stream": False,
|
||||
"tools": tools,
|
||||
**self.custom_params["custom_params"],
|
||||
}
|
||||
|
||||
# Remove None values from params
|
||||
|
||||
Reference in New Issue
Block a user