-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Update OpenAPI: image schemas/endpoints, roles, query limits, filters #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe OpenAPI spec was updated to add image schemas and document image references, introduce image retrieval and metadata query endpoints, expand roles and user role assignments, increase query length limits, adjust history filters, rename hallucination corrector pagination fields, add agent-related tags, and remove select API-key-type constraints. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant S as API Server
participant DS as Document Store
participant IS as Image Store
rect rgba(230,245,255,0.5)
note over C,S: Retrieve embedded image by ID (new)
C->>S: GET /v2/corpora/{corpus}/documents/{doc}/images/{image}
S->>DS: Validate corpus/doc access
alt Authorized
S->>IS: Fetch Image (id, mime_type, data)
IS-->>S: Image
S-->>C: 200 Image (base64 data, MIME)
else Forbidden
S-->>C: 403
else Not Found
S-->>C: 404
end
end
sequenceDiagram
autonumber
participant C as Client
participant S as API Server
participant IQ as Index/Query Engine
participant MD as Metadata Filter
rect rgba(240,255,240,0.5)
note over C,S: Metadata fuzzy query (new)
C->>S: POST /v2/corpora/{corpus}/metadata_query<br/>MetadataQueryRequest(queries[], level, filter, limit, offset)
S->>MD: Build metadata predicates from FieldQuery[]
S->>IQ: Execute metadata-level search
IQ-->>S: ScoredDocument[] + total_count
S-->>C: 200 MetadataQueryResponse
end
sequenceDiagram
autonumber
participant C as Client
participant S as API Server
participant QE as Query Engine
participant RS as Result Serializer
participant IS as Image Store
rect rgba(255,248,230,0.5)
note over C,S: Query with images in results (modified)
C->>S: POST /query (query up to 5000 chars)
S->>QE: Execute search
QE-->>S: Results (+ optional image_id per part)
S->>IS: Resolve image metadata for results
IS-->>S: ImageMetadata[]
S->>RS: Assemble IndividualSearchResult with image metadata
S-->>C: 200 Results (text + optional image)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
src/libs/Vectara/openapi.yaml (4)
3538-3543: Pagination results key mismatch breaks codegen.x-fern-pagination.results references $response.hallucinationCorrectionModels, but the schema returns hallucination_correctors (see ListHallucinationCorrectorsResponse). This will yield empty pages.
- results: $response.hallucinationCorrectionModels + results: $response.hallucination_correctors
1240-1249: Incorrect corpus_key examples (values are queries, not keys).Use actual corpus keys to prevent SDK docs confusion.
- Finance_risk_analysis: - summary: Risk metrics query in finance - value: Explain changes in VaR metrics over Q1 - Legal_terms_summary: - summary: Indemnification clause interpretation - value: Explain the indemnification clause - Support_kb: - summary: Internal support KB lookup - value: Steps to reset 2FA for legacy login system + Finance_risk_analysis: + summary: Finance corpus key + value: fin_esg_docs + Legal_terms_summary: + summary: Legal corpus key + value: legal_ip_cases + Support_kb: + summary: Support corpus key + value: support_web_portal
4760-4765: Metadata example has malformed keys/values.Stray quote and unquoted string value will invalidate example rendering.
- example: - department: engineering - doc_type": architecture_diagram + example: + department: engineering + doc_type: architecture_diagram
4779-4782: Malformed example under UploadFileRequest.example.Keys have trailing quotes; values should be strings.
- metadata: - department": engineering - doc_type": architecture_diagram + metadata: + department: engineering + doc_type: architecture_diagram
🧹 Nitpick comments (5)
src/libs/Vectara/openapi.yaml (5)
3126-3131: Copy change: wrong resource in error description.“listing summarizers” should be “listing LLMs”.
- description: Permissions do not allow listing summarizers. + description: Permissions do not allow listing LLMs.
5423-5426: Minor grammar fix in streaming descriptions.“Then end of …” → “The end of …”.
- description: Then end of generation will be denoted with an object with the type `generation_end`. + description: The end of generation will be denoted with an object with the type `generation_end`.- description: Then end of stream will be denoted with an object with the type `end`. + description: The end of stream will be denoted with an object with the type `end`.Also applies to: 5451-5455
5444-5448: Unknown x-vectaraParents reference.AgentStreamedResponse is referenced but no such schema exists. Either add it or drop the reference to avoid generator warnings.
- x-vectaraParents: - - QueryStreamedResponse - - ChatStreamedResponse - - SummarizeDocumentStreamedResponse - - AgentStreamedResponse + x-vectaraParents: + - QueryStreamedResponse + - ChatStreamedResponse + - SummarizeDocumentStreamedResponse- x-vectaraParents: - - QueryStreamedResponse - - ChatStreamedResponse - - SummarizeDocumentStreamedResponse - - AgentStreamedResponse + x-vectaraParents: + - QueryStreamedResponse + - ChatStreamedResponse + - SummarizeDocumentStreamedResponseAlso applies to: 5457-5461
6786-6789: Typo in description (“precofnigured”).- description: 'Name to reference the LLM. This will be used in other endpoints (like query) when using this LLM. If this name conflicts with a global LLM (a LLM that is precofnigured with the Vectara platform), then it will override that LLM for all usages.' + description: 'Name to reference the LLM. This will be used in other endpoints (like query) when using this LLM. If this name conflicts with a global LLM (an LLM that is preconfigured with the Vectara platform), then it will override that LLM for all usages.'
7753-7753: Add trailing newline.YAMLlint reports “no new line character at the end of file”.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (62)
src/libs/Vectara/Generated/Vectara..JsonSerializerContext.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.AgentConnectorsClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.AgentsClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.DocumentsClient.GetImage.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IAgentConnectorsClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IAgentsClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IDocumentsClient.GetImage.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IInstructionsClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IMetadataQueryClient.QueryMetadata.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IMetadataQueryClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IQueryHistoryClient.GetQueryHistories.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IToolsClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IUsersClient.CreateUser.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IUsersClient.UpdateUser.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.IVectaraClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.InstructionsClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.JsonConverters.AgentRoleRole.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.JsonConverters.AgentRoleRoleNullable.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.JsonConverters.CorpusRoleRole.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.JsonConverters.CorpusRoleRoleNullable.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.JsonConverters.MetadataQueryRequestLevel.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.JsonConverters.MetadataQueryRequestLevelNullable.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.MetadataQueryClient.QueryMetadata.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.MetadataQueryClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.AgentRole.Json.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.AgentRole.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.AgentRoleRole.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.ApiRole.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.CoreDocument.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.CoreDocumentPart.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.CorpusRole.Json.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.CorpusRole.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.CorpusRoleRole.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.CreateUserRequest.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.Document.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.FieldQuery.Json.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.FieldQuery.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.Image.Json.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.Image.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.ImageData.Json.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.ImageData.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.ImageMetadata.Json.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.ImageMetadata.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.IndividualSearchResult.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.MetadataQueryRequest.Json.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.MetadataQueryRequest.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.MetadataQueryRequestLevel.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.MetadataQueryResponse.Json.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.MetadataQueryResponse.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.ScoredDocument.Json.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.ScoredDocument.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.ScoredDocumentMetadata.Json.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.ScoredDocumentMetadata.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.StructuredDocumentSection.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.UpdateUserRequest.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.Models.User.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.QueryHistoryClient.GetQueryHistories.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.ToolsClient.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.UsersClient.CreateUser.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.UsersClient.UpdateUser.g.csis excluded by!**/generated/**src/libs/Vectara/Generated/Vectara.VectaraClient.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Vectara/openapi.yaml(29 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
src/libs/Vectara/openapi.yaml
[error] 7753-7753: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (1)
src/libs/Vectara/openapi.yaml (1)
5630-5631: LGTM: image pointer added to search results.Adding image: ImageMetadata to IndividualSearchResult is consistent with Document.images and the new image retrieval endpoint.
| get: | ||
| tags: | ||
| - Documents | ||
| summary: Retrieve an image from a document | ||
| description: Returns a specific image that is embedded within a document. The `image_id` uniquely identifies the image within the document. Use this endpoint to fetch the raw image data and associated metadata. | ||
| operationId: getImage | ||
| parameters: | ||
| - $ref: '#/components/parameters/RequestTimeout' | ||
| - $ref: '#/components/parameters/RequestTimeoutMillis' | ||
| - name: corpus_key | ||
| in: path | ||
| description: A unique identifier for the corpus that contains the target document. | ||
| required: true | ||
| schema: | ||
| $ref: '#/components/schemas/CorpusKey' | ||
| - name: document_id | ||
| in: path | ||
| description: The identifier of the document containing the image. This `document_id` must be percent encoded. | ||
| required: true | ||
| schema: | ||
| type: string | ||
| - name: image_id | ||
| in: path | ||
| description: The identifier of the image to retrieve from the specified document. Each image within a document has a unique `image_id`. This value must be percent-encoded when passed in the request URL. | ||
| required: true | ||
| schema: | ||
| type: string | ||
| responses: | ||
| '200': | ||
| description: An image including raw image data and associated metadata. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/Image' | ||
| example: | ||
| id: image_1 | ||
| title: Quarterly Sales Performance | ||
| caption: Sales growth trends for Q1 to Q4 of 2024 | ||
| description: 'A bar chart showing quarterly sales growth, with Q4 outperforming all previous quarters by 15%' | ||
| image_data: | ||
| data: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4//8/AAX+Av4N70a4AAAAAElFTkSuQmCC | ||
| mime_type: image/png | ||
| '403': | ||
| description: Permissions do not allow retrieving the image. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/Error' | ||
| '404': | ||
| description: Image not found. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/NotFoundError' | ||
| x-fern-sdk-group-name: documents | ||
| x-fern-sdk-method-name: get | ||
| '/v2/corpora/{corpus_key}/metadata_query': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Avoid SDK method-name collision in "documents" group.
This endpoint uses x-fern-sdk-method-name: get, which already exists for GET /v2/corpora/{corpus_key}/documents/{document_id}. Rename to avoid client generation conflicts.
- x-fern-sdk-method-name: get
+ x-fern-sdk-method-name: getImage📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| get: | |
| tags: | |
| - Documents | |
| summary: Retrieve an image from a document | |
| description: Returns a specific image that is embedded within a document. The `image_id` uniquely identifies the image within the document. Use this endpoint to fetch the raw image data and associated metadata. | |
| operationId: getImage | |
| parameters: | |
| - $ref: '#/components/parameters/RequestTimeout' | |
| - $ref: '#/components/parameters/RequestTimeoutMillis' | |
| - name: corpus_key | |
| in: path | |
| description: A unique identifier for the corpus that contains the target document. | |
| required: true | |
| schema: | |
| $ref: '#/components/schemas/CorpusKey' | |
| - name: document_id | |
| in: path | |
| description: The identifier of the document containing the image. This `document_id` must be percent encoded. | |
| required: true | |
| schema: | |
| type: string | |
| - name: image_id | |
| in: path | |
| description: The identifier of the image to retrieve from the specified document. Each image within a document has a unique `image_id`. This value must be percent-encoded when passed in the request URL. | |
| required: true | |
| schema: | |
| type: string | |
| responses: | |
| '200': | |
| description: An image including raw image data and associated metadata. | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/Image' | |
| example: | |
| id: image_1 | |
| title: Quarterly Sales Performance | |
| caption: Sales growth trends for Q1 to Q4 of 2024 | |
| description: 'A bar chart showing quarterly sales growth, with Q4 outperforming all previous quarters by 15%' | |
| image_data: | |
| data: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4//8/AAX+Av4N70a4AAAAAElFTkSuQmCC | |
| mime_type: image/png | |
| '403': | |
| description: Permissions do not allow retrieving the image. | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/Error' | |
| '404': | |
| description: Image not found. | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/NotFoundError' | |
| x-fern-sdk-group-name: documents | |
| x-fern-sdk-method-name: get | |
| '/v2/corpora/{corpus_key}/metadata_query': | |
| get: | |
| tags: | |
| - Documents | |
| summary: Retrieve an image from a document | |
| description: Returns a specific image that is embedded within a document. The `image_id` uniquely identifies the image within the document. Use this endpoint to fetch the raw image data and associated metadata. | |
| operationId: getImage | |
| parameters: | |
| - $ref: '#/components/parameters/RequestTimeout' | |
| - $ref: '#/components/parameters/RequestTimeoutMillis' | |
| - name: corpus_key | |
| in: path | |
| description: A unique identifier for the corpus that contains the target document. | |
| required: true | |
| schema: | |
| $ref: '#/components/schemas/CorpusKey' | |
| - name: document_id | |
| in: path | |
| description: The identifier of the document containing the image. This `document_id` must be percent encoded. | |
| required: true | |
| schema: | |
| type: string | |
| - name: image_id | |
| in: path | |
| description: The identifier of the image to retrieve from the specified document. Each image within a document has a unique `image_id`. This value must be percent-encoded when passed in the request URL. | |
| required: true | |
| schema: | |
| type: string | |
| responses: | |
| '200': | |
| description: An image including raw image data and associated metadata. | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/Image' | |
| example: | |
| id: image_1 | |
| title: Quarterly Sales Performance | |
| caption: Sales growth trends for Q1 to Q4 of 2024 | |
| description: 'A bar chart showing quarterly sales growth, with Q4 outperforming all previous quarters by 15%' | |
| image_data: | |
| data: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4//8/AAX+Av4N70a4AAAAAElFTkSuQmCC | |
| mime_type: image/png | |
| '403': | |
| description: Permissions do not allow retrieving the image. | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/Error' | |
| '404': | |
| description: Image not found. | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/NotFoundError' | |
| x-fern-sdk-group-name: documents | |
| x-fern-sdk-method-name: getImage | |
| '/v2/corpora/{corpus_key}/metadata_query': |
🤖 Prompt for AI Agents
In src/libs/Vectara/openapi.yaml around lines 1119 to 1175 the
x-fern-sdk-method-name for the GET
/v2/corpora/{corpus_key}/documents/{document_id}/images/{image_id} endpoint is
set to "get", colliding with the existing documents.get method; change
x-fern-sdk-method-name to a unique identifier such as "getImage" (or
"getDocumentImage") to avoid client generation conflicts, and ensure the new
name is applied consistently in that operation object while leaving
x-fern-sdk-group-name: documents unchanged.
| required: | ||
| - id | ||
| - image_data | ||
| - mime_type | ||
| type: object | ||
| properties: | ||
| id: | ||
| type: string | ||
| description: 'The unique identifier of the image within the document, used to reference it in related content.' | ||
| example: chart_1 | ||
| title: | ||
| type: string | ||
| description: 'A short, human-readable title for the image, often displayed above or alongside it.' | ||
| example: Quarterly Sales Performance | ||
| caption: | ||
| type: string | ||
| description: 'A brief caption providing context or an explanation for the image, typically displayed below it.' | ||
| example: Sales growth trends for Q1 to Q4 of 2024 | ||
| description: | ||
| type: string | ||
| description: 'A longer, detailed description of the image for accessibility or additional context.' | ||
| example: 'A bar chart showing quarterly sales growth, with Q4 outperforming all previous quarters by 15%' | ||
| mime_type: | ||
| type: string | ||
| description: 'The MIME type of the image, indicating the format of the binary data (e.g., image/jpeg for JPEG images).' | ||
| example: image/jpeg | ||
| description: 'An image element within a document, containing its identifying information and optional metadata.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ImageMetadata requires a non-existent property.
ImageMetadata.required includes image_data, but no such property exists on this schema (binary lives on Image/ImageData). This violates the schema.
- required:
- - id
- - image_data
- - mime_type
+ required:
+ - id
+ - mime_type📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| required: | |
| - id | |
| - image_data | |
| - mime_type | |
| type: object | |
| properties: | |
| id: | |
| type: string | |
| description: 'The unique identifier of the image within the document, used to reference it in related content.' | |
| example: chart_1 | |
| title: | |
| type: string | |
| description: 'A short, human-readable title for the image, often displayed above or alongside it.' | |
| example: Quarterly Sales Performance | |
| caption: | |
| type: string | |
| description: 'A brief caption providing context or an explanation for the image, typically displayed below it.' | |
| example: Sales growth trends for Q1 to Q4 of 2024 | |
| description: | |
| type: string | |
| description: 'A longer, detailed description of the image for accessibility or additional context.' | |
| example: 'A bar chart showing quarterly sales growth, with Q4 outperforming all previous quarters by 15%' | |
| mime_type: | |
| type: string | |
| description: 'The MIME type of the image, indicating the format of the binary data (e.g., image/jpeg for JPEG images).' | |
| example: image/jpeg | |
| description: 'An image element within a document, containing its identifying information and optional metadata.' | |
| required: | |
| - id | |
| - mime_type | |
| type: object | |
| properties: | |
| id: | |
| type: string | |
| description: 'The unique identifier of the image within the document, used to reference it in related content.' | |
| example: chart_1 | |
| title: | |
| type: string | |
| description: 'A short, human-readable title for the image, often displayed above or alongside it.' | |
| example: Quarterly Sales Performance | |
| caption: | |
| type: string | |
| description: 'A brief caption providing context or an explanation for the image, typically displayed below it.' | |
| example: Sales growth trends for Q1 to Q4 of 2024 | |
| description: | |
| type: string | |
| description: 'A longer, detailed description of the image for accessibility or additional context.' | |
| example: 'A bar chart showing quarterly sales growth, with Q4 outperforming all previous quarters by 15%' | |
| mime_type: | |
| type: string | |
| description: 'The MIME type of the image, indicating the format of the binary data (e.g., image/jpeg for JPEG images).' | |
| example: image/jpeg | |
| description: 'An image element within a document, containing its identifying information and optional metadata.' |
🤖 Prompt for AI Agents
In src/libs/Vectara/openapi.yaml around lines 4860 to 4886, the ImageMetadata
schema lists image_data in required but the schema does not define image_data
(the binary is defined elsewhere on Image/ImageData); remove image_data from the
required array or add a proper image_data property that references the existing
ImageData schema (e.g., $ref to the ImageData component) so the required list
matches defined properties; prefer removing image_data from required if metadata
should not include binary data, or otherwise add the correct property
definition/reference and update examples accordingly.
| enum: | ||
| - agent_admin | ||
| - agent_viewer | ||
| - agent_developer | ||
| type: string | ||
| description: The role assigned for this specific agent. | ||
| description: Agent-specific role assignment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Agent role naming inconsistency (admin vs administrator).
ApiRole uses agent_administrator while AgentRole enum uses agent_admin. Align to one spelling to avoid confusion and mismatched validation.
- - agent_admin
+ - agent_administrator🤖 Prompt for AI Agents
In src/libs/Vectara/openapi.yaml around lines 7373-7379, the AgentRole enum uses
"agent_admin" while ApiRole elsewhere uses "agent_administrator", causing
inconsistent validation; pick one canonical spelling (recommend coordinating
with existing ApiRole and change the enum to "agent_administrator" or
alternatively change ApiRole to "agent_admin"), then update the enum entry here
to match exactly, and search/replace all occurrences across the OpenAPI file and
codebase (schemas, validators, docs, tests) to keep them consistent and pass
schema validation.
Summary by CodeRabbit
New Features
Chores
Documentation