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

Update azure.openai.chat connector #816

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

JayaniH
Copy link
Contributor

@JayaniH JayaniH commented Oct 18, 2023

Description

Updates the azure.openai.chat connector to support the new API version with function calling capabilities and chat extensions.

Fixes https://github.com/wso2-enterprise/choreo/issues/24117

One line release note:

  • Update azure.openai.chat connector to support API version 2023-08-01-preview

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Locally tested the existing and new functionality.

Test Configuration:

  • Ballerina Version: 2201.7.2 (Swan Lake Update 7)
  • Operating System: macOs Monterey
  • Java SDK:

Checklist:

Changes to OpenAPI definition

  • Modified info section of the OpenAPI definition file - Example

    • description - what the connector is about
    • x-ballerina-init-description OpenAPI extension - connector initialization details
    • x-ballerina-display OpenAPI extension - connector name and path to the connector icon
  • Added proper description each API Key, if API Key authentication is defined in OpenAPI definition file

Changes to connector module

  • Added license header at the top of each .bal file.
  • Added Package.md as per the guide here
  • Added Module.md for the module of the connector as per the guide here
  • Added connector icon to the root of the connector. Icon needs to be a png of 200x200 px size with name icon.png
  • Added Ballerina.toml file with following information. For keywords refer to guide

Verifying connector module

  • Compiled the connector successfully with the targeted ballerina version.
  • Conducted smoke tests on the connector (Recommended when OpenAPI definition is obtain from an unofficial source)

Security checks

Message_context? context?;
};

public type ChatCompletionsResponseCommon_usage record {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public types should have documentation. If the openapi spec is written by us, shall we add the documentation there and generate the connector again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the spec is not written by us. however, we can relevant descriptions to the spec if needed.

Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LakshanSS LakshanSS merged commit bd358e8 into ballerina-platform:main Oct 30, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants