mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-25 08:48:13 +02:00
Merge branch 'main' into feat/audio_recording_in_tool_calls
This commit is contained in:
commit
5efcccf204
24 changed files with 450 additions and 93 deletions
|
|
@ -9,8 +9,9 @@ from pydantic import BaseModel, Field, field_validator
|
|||
|
||||
from api.db import db_client
|
||||
from api.db.models import UserModel
|
||||
from api.enums import ToolCategory, ToolStatus
|
||||
from api.enums import PostHogEvent, ToolCategory, ToolStatus
|
||||
from api.services.auth.depends import get_user
|
||||
from api.services.posthog_client import capture_event
|
||||
|
||||
router = APIRouter(prefix="/tools")
|
||||
|
||||
|
|
@ -342,6 +343,16 @@ async def create_tool(
|
|||
icon_color=request.icon_color,
|
||||
)
|
||||
|
||||
capture_event(
|
||||
distinct_id=str(user.provider_id),
|
||||
event=PostHogEvent.TOOL_CREATED,
|
||||
properties={
|
||||
"tool_name": request.name,
|
||||
"tool_category": request.category,
|
||||
"organization_id": user.selected_organization_id,
|
||||
},
|
||||
)
|
||||
|
||||
return build_tool_response(tool)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue