Skip to content
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

Fixes the issue with Azure OpenAI Chat and OpenAI Chat connector when getting nullable values #833

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions openapi/azure.openai.chat/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,7 @@ components:
system_fingerprint:
type: string
description: Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
nullable: true
required:
- id
- object
Expand Down
2 changes: 1 addition & 1 deletion openapi/azure.openai.chat/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public type ChatCompletionsResponseCommon record {
# Usage statistics for the completion request.
CompletionUsage usage?;
# Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
string system_fingerprint?;
string? system_fingerprint?;
};

# Error response object.
Expand Down
7 changes: 1 addition & 6 deletions openapi/openai.chat/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,6 @@ components:
$ref: '#/components/schemas/ChatCompletionMessageToolCalls'
function_call:
type: object
deprecated: true
description: Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.
properties:
arguments:
Expand Down Expand Up @@ -829,7 +828,6 @@ components:
ChatCompletionRequestFunctionMessage:
type: object
title: Function message
deprecated: true
properties:
role:
type: string
Expand All @@ -856,7 +854,6 @@ components:
additionalProperties: true
ChatCompletionFunctions:
type: object
deprecated: true
properties:
description:
type: string
Expand Down Expand Up @@ -1001,7 +998,6 @@ components:
description: The role of the author of this message.
function_call:
type: object
deprecated: true
description: Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.
properties:
arguments:
Expand Down Expand Up @@ -1186,7 +1182,6 @@ components:
description: |
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).
function_call:
deprecated: true
description: |
Deprecated in favor of `tool_choice`.

Expand All @@ -1206,7 +1201,6 @@ components:
- $ref: '#/components/schemas/ChatCompletionFunctionCallOption'
x-oaiExpandable: true
functions:
deprecated: true
description: |
Deprecated in favor of `tools`.

Expand Down Expand Up @@ -1279,6 +1273,7 @@ components:
This fingerprint represents the backend configuration that the model runs with.

Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
nullable: true
object:
type: string
description: The object type, which is always `chat.completion`.
Expand Down
7 changes: 1 addition & 6 deletions openapi/openai.chat/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ public type ChatCompletionNamedToolChoice record {
};

# Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.
#
# # Deprecated
@deprecated
public type ChatCompletionRequestAssistantMessage_function_call record {
# The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
string arguments;
Expand Down Expand Up @@ -286,14 +283,13 @@ public type CreateChatCompletionResponse record {
# This fingerprint represents the backend configuration that the model runs with.
#
# Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
string system_fingerprint?;
string? system_fingerprint?;
# The object type, which is always `chat.completion`.
"chat.completion" 'object;
# Usage statistics for the completion request.
CompletionUsage usage?;
};

@deprecated
public type ChatCompletionRequestFunctionMessage record {
# The role of the messages author, in this case `function`.
"function" role;
Expand All @@ -318,7 +314,6 @@ public type ChatCompletionRequestToolMessage record {
string tool_call_id;
};

@deprecated
public type ChatCompletionFunctions record {
# A description of what the function does, used by the model to choose when and how to call the function.
string description?;
Expand Down
Loading