-
Notifications
You must be signed in to change notification settings - Fork 14
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
OAI Prototype: Remove ClientPipelineExtensions #213
base: main
Are you sure you want to change the base?
OAI Prototype: Remove ClientPipelineExtensions #213
Conversation
@@ -44,7 +45,6 @@ internal PipelineMessage CreateCreateChatCompletionRequest(BinaryContent content | |||
request.Headers.Set("Accept", "application/json"); | |||
request.Headers.Set("Content-Type", "application/json"); | |||
request.Content = content; | |||
message.Apply(options); |
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.
This moves into ClientPipeline.ProcessMessage
.dotnet/src/Generated/ChatClient.cs
Outdated
@@ -35,6 +35,7 @@ internal PipelineMessage CreateCreateChatCompletionRequest(BinaryContent content | |||
{ | |||
var message = _pipeline.CreateMessage(); | |||
message.ResponseClassifier = PipelineMessageClassifier200; | |||
message.ExceptionFactory = _exceptionFactory; |
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.
Custom exception factory is set on the message.
@@ -65,6 +66,7 @@ protected internal ChatClient(ClientPipeline pipeline, string model, Uri endpoin | |||
_pipeline = pipeline; | |||
_endpoint = endpoint; | |||
_telemetry = new OpenTelemetrySource(model, endpoint); | |||
_exceptionFactory = new OpenAIExceptionFactory(); |
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.
Customization layer sets this in the client constructor, or generated code sets it to ClientResultExceptionFactory.Default.
No description provided.