Skip to content

feat:Update OpenAPI spec with conversation filter, agent category, and invoice discount#84

Merged
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202505060921
May 6, 2025
Merged

feat:Update OpenAPI spec with conversation filter, agent category, and invoice discount#84
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202505060921

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented May 6, 2025

Summary by CodeRabbit

  • New Features
    • Added the ability to filter conversations by start time using a new parameter.
    • Introduced agent categories, allowing agents to be tagged with descriptive categories during creation and updates.
    • Added display of discount percentage information on invoices.

@coderabbitai
Copy link

coderabbitai bot commented May 6, 2025

Walkthrough

The OpenAPI specification for the ElevenLabs API was updated to add a new conversation filtering query parameter, introduce agent category metadata in agent-related schemas, and include a discount percentage field in the invoice schema. These changes enhance endpoint capabilities and data models for conversations, agents, and invoices.

Changes

File Change Summary
src/libs/ElevenLabs/openapi.yaml Added call_start_after_unix query parameter to conversations endpoint; added categories property to agent models and request bodies; added discount_percent_off to invoice model.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API

    Note over Client,API: Filtering Conversations by Start Time
    Client->>API: GET /v1/convai/conversations?call_start_after_unix=TIMESTAMP
    API-->>Client: Returns conversations started after TIMESTAMP

    Note over Client,API: Creating or Updating an Agent with Categories
    Client->>API: POST/PATCH /v1/convai/agents (with categories array)
    API-->>Client: Returns agent info including categories

    Note over Client,API: Retrieving Invoice with Discount
    Client->>API: GET /v1/invoices/{id}
    API-->>Client: Returns invoice including discount_percent_off
Loading

Poem

In YAML fields both new and bright,
Agents now have tags in sight.
Invoices show discounts fair,
Conversations filtered with care.
Hopping forward, features grow—
A rabbit’s joy in every row!
🐇✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@HavenDV HavenDV merged commit 6fb08f1 into main May 6, 2025
3 of 4 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202505060921 branch May 6, 2025 09:22
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Update OpenAPI spec with conversation filter, agent category, and invoice discount May 6, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
src/libs/ElevenLabs/openapi.yaml (2)

6200-6207: Typo and phrasing in query parameter description
The description fields both say "filter conversations after to this start date." Remove the extraneous "to" and clarify that it filters by a Unix timestamp after a given time. For example:

-description: Unix timestamp (in seconds) to filter conversations after to this start date.
+description: Unix timestamp (in seconds) to filter conversations that started after this time.

14908-14912: Clarify invoice discount example formatting
The description uses [20.0f], which resembles a language-specific float suffix and may confuse clients. Consider simplifying to 20.0 or 20:

-description: 'The discount applied to the invoice. E.g. [20.0f] for 20% off.'
+description: 'The discount applied to the invoice as a percentage (e.g., 20.0 for 20% off).'
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 86855c6 and 0611c70.

⛔ Files ignored due to path filters (11)
  • src/libs/ElevenLabs/Generated/ElevenLabs.ConversationalAIClient.CreateConvaiAgentsCreate.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.ConversationalAIClient.EditConvaiAgentsByAgentId.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.ConversationalAIClient.GetConvaiConversations.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IConversationalAIClient.CreateConvaiAgentsCreate.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IConversationalAIClient.EditConvaiAgentsByAgentId.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IConversationalAIClient.GetConvaiConversations.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.AgentSummaryResponseModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyCreateAgentV1ConvaiAgentsCreatePost.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatch.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.GetAgentResponseModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.InvoiceResponseModel.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/ElevenLabs/openapi.yaml (8 hunks)
🔇 Additional comments (4)
src/libs/ElevenLabs/openapi.yaml (4)

8581-8587: Agent summary schema: marking categories as required
Adding categories to the required list ensures all agent summaries include category metadata. This aligns with the design to treat categories as core metadata.


8597-8603: Define categories property correctly
The new categories array (of strings) is well-defined with a clear title and description. It’s consistent with other schema conventions.


8611-8615: Update example for agent categories
The illustrative list of categories helps clients understand valid values. Approved.


13944-13949: Add categories to agent detail response
Including categories in the detailed agent response ensures clients receive full metadata about the agent. The schema and description are consistent.

Comment on lines +10518 to +10528
categories:
title: Categories
type: array
items:
type: string
description: Categories to help classify and filter the agent
nullable: true
example:
- Customer Support
- Technical Help
- Eleven
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Incorrect addition of categories to avatar upload body
The Body_Post_Agent_avatar_v1_convai_agents__agent_id__avatar_post schema is for uploading an avatar, not updating agent metadata. The categories field should not be part of this request body. Please remove or correct its placement.

🤖 Prompt for AI Agents (early access)
In src/libs/ElevenLabs/openapi.yaml around lines 10518 to 10528, the `categories` field is incorrectly included in the avatar upload request body schema `Body_Post_Agent_avatar_v1_convai_agents__agent_id__avatar_post`. Remove the entire `categories` property from this schema to ensure the avatar upload body only contains relevant fields for uploading an avatar and does not include agent metadata.

Comment on lines +9407 to +9417
categories:
title: Categories
type: array
items:
type: string
description: Categories to help classify and filter the agent
nullable: true
example:
- Customer Support
- Technical Help
- Eleven
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Misplaced categories in voice PVC body
The Body_Create_PVC_voice_v1_voices_pvc_post schema is for voice PVC creation, not agent metadata. The categories field appears to be intended for agent creation PATCH/POST bodies. Please remove or relocate this property to the correct agent endpoints.

🤖 Prompt for AI Agents (early access)
In src/libs/ElevenLabs/openapi.yaml around lines 9407 to 9417, the `categories` field is incorrectly included in the voice PVC creation body schema `Body_Create_PVC_voice_v1_voices_pvc_post`. This field is meant for agent metadata in agent creation PATCH/POST endpoints. Remove the `categories` property from this voice PVC schema and relocate it to the appropriate agent creation request bodies to maintain correct API specification structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant