-
-
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:Add new endpoints and improve LangSmith API functionality and documentation #30
Conversation
WalkthroughThe changes introduce new features and enhance existing functionalities within the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ChartsClient
participant API
participant ResponseHandler
User->>ChartsClient: ReadChartPreviewApiV1ChartsPreviewPostAsync(request)
ChartsClient->>API: POST /api/v1/charts/preview
API->>ChartsClient: Chart preview response
ChartsClient->>ResponseHandler: Process response
ResponseHandler-->>User: Return chart preview
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 as PR comments)
Additionally, you can add 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, codebase verification and nitpick comments (10)
src/libs/LangSmith/Generated/LangSmith.Models.CustomChartCreatePreview.g.cs (3)
6-8
: Add a class summary.The class lacks a summary description. Consider adding a brief explanation of the class's purpose.
/// <summary> -/// +/// Represents a preview of a custom chart creation. /// </summary>
11-13
: Add a property summary forSeries
.The
Series
property lacks a summary description. Consider adding a brief explanation of what this property represents./// <summary> -/// +/// Gets or sets the series data for the custom chart. /// </summary>
18-20
: Add a property summary forAdditionalProperties
.The
AdditionalProperties
property lacks a summary description. Consider adding a brief explanation of what this property represents./// <summary> -/// Additional properties that are not explicitly defined in the schema +/// Gets or sets additional properties that are not explicitly defined in the schema. /// </summary>src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponseBase.g.cs (3)
6-8
: Add a class summary.The class lacks a summary description. Consider adding a brief explanation of the class's purpose.
/// <summary> -/// +/// Represents the base response for a single custom chart. /// </summary>
11-13
: Add a property summary forData
.The
Data
property lacks a summary description. Consider adding a brief explanation of what this property represents./// <summary> -/// +/// Gets or sets the data points for the custom chart. /// </summary>
18-20
: Add a property summary forAdditionalProperties
.The
AdditionalProperties
property lacks a summary description. Consider adding a brief explanation of what this property represents./// <summary> -/// Additional properties that are not explicitly defined in the schema +/// Gets or sets additional properties that are not explicitly defined in the schema. /// </summary>src/libs/LangSmith/Generated/LangSmith.Models.CustomChartPreviewRequest.g.cs (4)
6-8
: Add a class summary.The class lacks a summary description. Consider adding a brief explanation of the class's purpose.
/// <summary> -/// +/// Represents a request for a custom chart preview. /// </summary>
11-13
: Add a property summary forBucketInfo
.The
BucketInfo
property lacks a summary description. Consider adding a brief explanation of what this property represents./// <summary> -/// +/// Gets or sets the bucket information for the custom chart request. /// </summary>
18-20
: Add a property summary forChart
.The
Chart
property lacks a summary description. Consider adding a brief explanation of what this property represents./// <summary> -/// +/// Gets or sets the chart details for the custom chart preview. /// </summary>
25-27
: Add a property summary forAdditionalProperties
.The
AdditionalProperties
property lacks a summary description. Consider adding a brief explanation of what this property represents./// <summary> -/// Additional properties that are not explicitly defined in the schema +/// Gets or sets additional properties that are not explicitly defined in the schema. /// </summary>
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (10)
- src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs (1 hunks)
- src/libs/LangSmith/Generated/LangSmith.LangSmithApi.OkApiV1OkGet.g.cs (5 hunks)
- src/libs/LangSmith/Generated/LangSmith.Models.CustomChartCreatePreview.g.cs (1 hunks)
- src/libs/LangSmith/Generated/LangSmith.Models.CustomChartPreviewRequest.g.cs (1 hunks)
- src/libs/LangSmith/Generated/LangSmith.Models.CustomChartsRequestBase.g.cs (1 hunks)
- src/libs/LangSmith/Generated/LangSmith.Models.OkApiV1OkGetResponse.g.cs (1 hunks)
- src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponse.g.cs (2 hunks)
- src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponseBase.g.cs (1 hunks)
- src/libs/LangSmith/Generated/LangSmith.RunClient.QueryRunsApiV1RunsQueryPost.g.cs (2 hunks)
- src/libs/LangSmith/openapi.yaml (9 hunks)
Files skipped from review due to trivial changes (2)
- src/libs/LangSmith/Generated/LangSmith.Models.OkApiV1OkGetResponse.g.cs
- src/libs/LangSmith/Generated/LangSmith.RunClient.QueryRunsApiV1RunsQueryPost.g.cs
Additional context used
GitHub Check: Test / Build, test and publish
src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs
[failure] 94-94:
'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
[failure] 94-94:
'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
[failure] 94-94:
'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
[failure] 94-94:
'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
[failure] 94-94:
'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
Additional comments not posted (22)
src/libs/LangSmith/Generated/LangSmith.Models.CustomChartsRequestBase.g.cs (5)
16-17
: LGTM!The
Timezone
property is well-defined with a default value of "UTC".
22-24
: LGTM!The
StartTime
property is correctly marked as required.
29-31
: LGTM!The
EndTime
property is well-defined with a custom converter to handle multiple types.
36-38
: LGTM!The
Stride
property is correctly defined with a custom converter for complex types.
43-44
: LGTM!The
AdditionalProperties
property is correctly defined to handle extra data.src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponse.g.cs (1)
16-18
: LGTM!The
Data
property is correctly marked as required and uses appropriate JSON serialization attributes.src/libs/LangSmith/Generated/LangSmith.LangSmithApi.OkApiV1OkGet.g.cs (5)
8-9
: LGTM!The method
PrepareOkApiV1OkGetArguments
is correctly renamed to align with the new API versioning scheme.
10-12
: LGTM!The method
PrepareOkApiV1OkGetRequest
is correctly renamed to align with the new API versioning scheme.
13-15
: LGTM!The method
ProcessOkApiV1OkGetResponse
is correctly renamed to align with the new API versioning scheme.
17-19
: LGTM!The method
ProcessOkApiV1OkGetResponseContent
is correctly renamed to align with the new API versioning scheme.
Line range hint
27-79
: LGTM!The method
OkApiV1OkGetAsync
is correctly renamed and updated to align with the new API versioning scheme and endpoint structure.src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs (2)
84-91
: LGTM! Error handling logic is appropriate.The error handling for unsuccessful HTTP responses is well-implemented using
EnsureSuccessStatusCode
and catchingHttpRequestException
.
106-120
: LGTM! Method implementation is correct.The method correctly constructs a
CustomChartPreviewRequest
and calls the other overload.src/libs/LangSmith/openapi.yaml (9)
Line range hint
1-5
: Verify the removal of the description for/api/v1/runs/query
.The description for this endpoint has been removed. Ensure that this change is intentional and does not impact the understanding of the API's functionality.
7769-7798
: LGTM! But verify the associated schemas for/api/v1/charts/preview
.The addition of the
/api/v1/charts/preview
endpoint is well-defined.Ensure that the
CustomChartPreviewRequest
andSingleCustomChartResponseBase
schemas are correctly implemented and meet the expected requirements.
8002-8011
: Approved: Addition of/api/v1/ok
endpoint.The
/api/v1/ok
endpoint is a useful addition for health checks and connectivity confirmation.
Line range hint
1-5
: Approved: Security requirements.The security requirements are consistent and correctly applied.
10283-10293
: LGTM! But verify theCustomChartSeries
schema forCustomChartCreatePreview
.The
CustomChartCreatePreview
schema is well-defined.Ensure that the
CustomChartSeries
schema is correctly implemented and meets the expected requirements.
10316-10326
: LGTM! But verify the referenced schemas forCustomChartPreviewRequest
.The
CustomChartPreviewRequest
schema is well-defined.Ensure that the
CustomChartsRequestBase
andCustomChartCreatePreview
schemas are correctly implemented and meet the expected requirements.
10583-10609
: LGTM! But verify theTimedeltaInput
schema forCustomChartsRequestBase
.The
CustomChartsRequestBase
schema is well-defined.Ensure that the
TimedeltaInput
schema is correctly implemented and meets the expected requirements.
16269-16281
: LGTM! But verify theCustomChartsDataPoint
schema forSingleCustomChartResponse
.The addition of the
data
property to theSingleCustomChartResponse
schema is appropriate.Ensure that the
CustomChartsDataPoint
schema is correctly implemented and meets the expected requirements.
16309-16314
: Approved: Addition ofSingleCustomChartResponseBase
schema.The
SingleCustomChartResponseBase
schema is well-defined and consistent with other response schemas.
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::LangSmith.SourceGenerationContext.Default.NullableSingleCustomChartResponseBase) ?? | ||
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); |
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.
Fix the deserialization issue.
The SourceGenerationContext
does not contain a definition for NullableSingleCustomChartResponseBase
, which causes a build failure.
Ensure that NullableSingleCustomChartResponseBase
is correctly defined or imported. If it's missing, consider adding it to SourceGenerationContext
or replacing it with the correct type.
Tools
GitHub Check: Test / Build, test and publish
[failure] 94-94:
'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
[failure] 94-94:
'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
[failure] 94-94:
'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
[failure] 94-94:
'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
[failure] 94-94:
'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
Summary by CodeRabbit
New Features
Bug Fixes
Documentation