Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.02k stars 1.19k forks source link

Analyze Business Data #30412

Closed jbalsamo closed 3 weeks ago

jbalsamo commented 1 month ago

Type of issue

Code doesn't work

Description

The code under the section "Analyze Business Data" has an error. This Code:

    const events = await client.streamChatCompletions(deploymentId, messages, {
      maxTokens: 1000,
      azureExtensionOptions: {
        extensions: [
          {
            "type": "AzureCognitiveSearch",
            "endpoint": azSearchUrl,
            "key": azSearchKey,
            "indexName": azIndexName,
          },
        ],
      },
    });

The parameter endpoint, generates the typescript error below:

Object literal may only specify known properties, and '"endpoint"' does not exist in type 'AzureChatExtensionConfiguration'.ts(2353)

Please let me know if this code from the docs is incorrect.

Page URL

https://learn.microsoft.com/en-us/javascript/api/overview/azure/openai-readme?view=azure-node-preview&viewFallbackFrom=azure-node-latest#getting-started

Content source URL

https://github.com/MicrosoftDocs/azure-docs-sdk-node/blob/main/docs-ref-services/preview/openai-readme.md

Document Version Independent Id

320f9d0d-6ca4-8c03-8fce-0142ee95c115

Article author

@azure-sdk

Metadata

github-actions[bot] commented 1 month ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @glharper.

deyaaeldeen commented 1 month ago

Hi @jbalsamo,

Thanks for opening this report! We released v2 of this library and moved the client to the official OpenAI client library for JavaScript instead. Please checkout the updated sample for how to analyze business data: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/openai/openai/README.md#analyze-business-data

github-actions[bot] commented 1 month ago

Hi @jbalsamo. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

github-actions[bot] commented 3 weeks ago

Hi @jbalsamo, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.