mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-26 16:48:13 +00:00
Support to generate a tool spec file for each published released (#313)
* feat: generate tool specs file based on their schema definition * generate tool spec after publishing a new release * feat: support add available env-vars to tool.specs.json * refactor: use better identifier names on tool specs * feat: change tool specs generation to run daily * feat: add auth token to notify api about tool changes * refactor: use humanized_name instead of verbose_name * refactor: generate tool spec after pushing to main This commit also fix the remote upstream & updated the notify api
This commit is contained in:
@@ -2,10 +2,10 @@ import datetime
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
from typing import Any, Optional, Type
|
||||
from typing import Any, List, Optional, Type
|
||||
|
||||
import requests
|
||||
from crewai.tools import BaseTool
|
||||
from crewai.tools import BaseTool, EnvVar
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -45,6 +45,9 @@ class SerperDevTool(BaseTool):
|
||||
country: Optional[str] = ""
|
||||
location: Optional[str] = ""
|
||||
locale: Optional[str] = ""
|
||||
env_vars: List[EnvVar] = [
|
||||
EnvVar(name="SERPER_API_KEY", description="API key for Serper", required=True),
|
||||
]
|
||||
|
||||
def _get_search_url(self, search_type: str) -> str:
|
||||
"""Get the appropriate endpoint URL based on search type."""
|
||||
|
||||
Reference in New Issue
Block a user