-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat:Update openapi.yaml with new endpoint and modified JSON schemas #114
Conversation
WalkthroughThe changes in this pull request primarily involve modifications to the Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
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: 1
🧹 Outside diff range and nitpick comments (2)
src/libs/LangSmith/openapi.yaml (2)
Line range hint
10288-10449
: Consider reducing schema duplication using composition.The AIMessage and AIMessageChunk schemas have been split into Input/Output variants, which improves type safety. However, there's significant duplication between these variants.
Consider using OpenAPI composition to reduce duplication:
# Base schema for common properties AIMessageBase: type: object required: - content properties: content: title: Content anyOf: - type: string - type: array items: anyOf: - type: string - type: object # ... other common properties # Input/Output specific schemas AIMessage-Input: allOf: - $ref: '#/components/schemas/AIMessageBase' - type: object # Input specific properties AIMessage-Output: allOf: - $ref: '#/components/schemas/AIMessageBase' - type: object # Output specific properties
15746-15815
: Enhance schema documentation and extensibility.The PlaygroundPromptCanvas schemas are well-structured, but could benefit from some improvements:
- Enum values need descriptions
- Template format options are limited
- Reading levels might need localization support
Consider these enhancements:
reading_level: title: Reading Level enum: - child - teenager - college - phd type: string + description: Target audience reading comprehension level + x-enum-descriptions: + child: "Simple language for ages 7-12" + teenager: "Moderate complexity for ages 13-17" + college: "Advanced vocabulary for undergraduate level" + phd: "Technical/specialized language for expert level" template_format: title: Template Format enum: - f-string - mustache + - jinja2 + - handlebars type: string + description: Template syntax format for variable substitution
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (68)
src/libs/LangSmith/Generated/JsonConverters.AIMessageChunkInputType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.AIMessageChunkInputTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.AIMessageChunkOutputType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.AIMessageChunkOutputTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.AIMessageInputType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.AIMessageInputTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.AIMessageOutputType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.AIMessageOutputTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.MessagesItem.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.MessagesItem2.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlayGroundGraphMessageDiscriminatorType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasPayloadArtifactLength.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasPayloadArtifactLengthNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasPayloadMessageDiscriminatorType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasPayloadMessageDiscriminatorTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasPayloadReadingLevel.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasPayloadReadingLevelNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasPayloadTemplateFormat.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasPayloadTemplateFormatNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasResponseArtifactLength.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasResponseArtifactLengthNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasResponseMessageDiscriminatorType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasResponseMessageDiscriminatorTypeNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasResponseReadingLevel.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonConverters.PlaygroundPromptCanvasResponseReadingLevelNullable.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonSerializerContext.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/JsonSerializerContextTypes.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.IPromptsClient.Canvas.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.IPublicClient.GetToolDefJsonSchema.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageChunkInput.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageChunkInputAdditionalKwargs.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageChunkInputContentVariant2Item.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageChunkInputResponseMetadata.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageChunkInputType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageChunkOutput.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageChunkOutputAdditionalKwargs.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageChunkOutputContentVariant2Item.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageChunkOutputResponseMetadata.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageChunkOutputType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageInput.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageInputAdditionalKwargs.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageInputContentVariant2Item.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageInputResponseMetadata.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageInputType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageOutput.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageOutputAdditionalKwargs.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageOutputContentVariant2Item.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageOutputResponseMetadata.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageOutputType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.AIMessageResponseMetadata.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.CanvasApiV1PromptsCanvasPostResponse.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.GetToolDefJsonSchemaApiV1PublicSchemasVersionTooldefJsonGetResponse.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.MessagesItem.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.MessagesItem2.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlayGroundGraphMessageDiscriminatorType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasPayload.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasPayloadArtifactLength.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasPayloadMessageDiscriminator.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasPayloadMessageDiscriminatorType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasPayloadReadingLevel.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasPayloadTemplateFormat.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasResponse.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasResponseArtifactLength.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasResponseMessageDiscriminator.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasResponseMessageDiscriminatorType.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.Models.PlaygroundPromptCanvasResponseReadingLevel.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.PromptsClient.Canvas.g.cs
is excluded by!**/generated/**
src/libs/LangSmith/Generated/LangSmith.PublicClient.GetToolDefJsonSchema.g.cs
is excluded by!**/generated/**
📒 Files selected for processing (1)
- src/libs/LangSmith/openapi.yaml (5 hunks)
🔇 Additional comments (1)
src/libs/LangSmith/openapi.yaml (1)
7415-7423
: LGTM: Schema references updated correctly.The schema references have been properly updated to use the new PlaygroundPromptCanvas payload and response types.
'/api/v1/public/schemas/{version}/tooldef.json': | ||
get: | ||
tags: | ||
- public | ||
summary: Get Tool Def Json Schema | ||
operationId: get_tool_def_json_schema_api_v1_public_schemas__version__tooldef_json_get | ||
parameters: | ||
- name: version | ||
in: path | ||
required: true | ||
schema: | ||
title: Version | ||
type: string | ||
responses: | ||
'200': | ||
description: Successful Response | ||
content: | ||
application/json: | ||
schema: { } | ||
'422': | ||
description: Validation Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/HTTPValidationError' |
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.
Endpoint definition needs additional details.
The new tool definition endpoint has several areas that need attention:
- The response schema is empty (
schema: { }
). - The version parameter lacks constraints or allowed values.
- Missing description of what constitutes a tool definition.
Consider adding these improvements:
schema:
title: Version
type: string
+ description: Version of the tool definition schema
+ enum: ["v1", "v2"] # Add supported versions
+ example: "v1"
responses:
'200':
description: Successful Response
content:
application/json:
- schema: { }
+ schema:
+ type: object
+ description: JSON Schema defining the structure of tool definitions
Committable suggestion was skipped due to low confidence.
Summary by CodeRabbit
New Features
Changes