Giter Site home page Giter Site logo

Comments (11)

joshfree avatar joshfree commented on May 23, 2024

Thanks for sharing this beta feedback @hind214875 -- @mssfang can you please follow up?

from azure-sdk-for-java.

mssfang avatar mssfang commented on May 23, 2024

Thank you for reporting this issue. @hind214875
Can you try update pom dependency as below?

<dependencies>
   <dependency>
     <groupId>com.azure</groupId>
     <artifactId>azure-ai-openai</artifactId>
     <version>1.0.0-beta.6</version>
   </dependency>

   <dependency>
     <groupId>com.azure</groupId>
     <artifactId>azure-search-documents</artifactId>
     <version>11.6.0-beta.7</version>
     <exclusions>
         <exclusion>
             <groupId>com.azure</groupId>
             <artifactId>azure-core-serializer-json-jackson</artifactId>
         </exclusion>
     </exclusions>
   </dependency>
 </dependencies>

from azure-sdk-for-java.

github-actions avatar github-actions commented on May 23, 2024

Hi @hind214875. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

from azure-sdk-for-java.

hind214875 avatar hind214875 commented on May 23, 2024

Hi mssfang!
Thank you for your reply, but unfortunately it is still not working.

from azure-sdk-for-java.

mssfang avatar mssfang commented on May 23, 2024

Hi mssfang! Thank you for your reply, but unfortunately it is still not working.

Thanks for the try out. Is possible we can have a sample code that can reproduce this issue?

from azure-sdk-for-java.

mssfang avatar mssfang commented on May 23, 2024

Is possible we can have a sample code from your side that can use to reproduce the issue?

I have tried to use following codesnippet to reproduce the issue but find there is able to get the URL and filePath.

String azureSearchIndexName = "openai-test-index-carbon-wiki"; // "hotels-vector-sample-index"

        AzureCognitiveSearchChatExtensionConfiguration searchConfiguration =
                new AzureCognitiveSearchChatExtensionConfiguration(
                        new AzureCognitiveSearchChatExtensionParameters(azureSearchEndpoint, azureSearchIndexName)
                                .setAuthentication(new OnYourDataApiKeyAuthenticationOptions(azureSearchAdminKey))
                                .setQueryType(AzureCognitiveSearchQueryType.SIMPLE) // SIMPLE, VECTOR, or Hybrid
                                .setInScope(true)
                                .setTopNDocuments(2)
                                // the deployment name of the embedding model when you are using a vector or hybrid query type
                                .setEmbeddingDependency(new OnYourDataDeploymentNameVectorizationSource("text-embedding-ada-002"))
                                .setFieldsMapping(
                                        new AzureCognitiveSearchIndexFieldMappingOptions()
                                                .setFilepathField("setupwinenv.md")
                                )
                );

        String question = "How to build carbon on Windows";
        List<ChatRequestMessage> chatMessages = new ArrayList<>();
        chatMessages.add(new ChatRequestUserMessage(question));
        ChatCompletionsOptions chatCompletionsOptions = new ChatCompletionsOptions(chatMessages)
                .setDataSources(Arrays.asList(searchConfiguration));

        ChatCompletions chatCompletions = client.getChatCompletions(deploymentOrModelId, chatCompletionsOptions);

        System.out.println("Question: " + question);
        for (ChatChoice choice : chatCompletions.getChoices()) {
            ChatResponseMessage message = choice.getMessage();
            System.out.printf("Answer: %s%n%n", message.getContent());
            // If Azure OpenAI chat extensions are configured, this array represents the incremental steps performed
            // by those extensions while processing the chat completions request.
            List<ChatResponseMessage> contextMessages = message.getContext().getMessages();
            for (ChatResponseMessage contextMessage : contextMessages) {
                System.out.println("Context Message: ");
                System.out.println("   - " + contextMessage.getContent());
            }
        }

image

image

Hi mssfang! Thank you for your reply, but unfortunately it is still not working.

from azure-sdk-for-java.

github-actions avatar github-actions commented on May 23, 2024

Hi @hind214875. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

from azure-sdk-for-java.

github-actions avatar github-actions commented on May 23, 2024

Hi @hind214875, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

from azure-sdk-for-java.

hind214875 avatar hind214875 commented on May 23, 2024

Hi mssfang!

Sorry for the late replay, I actually tested yesterday again and this time it works i didn't change anything so i don't really know why it works now. Thank you for your help :)

from azure-sdk-for-java.

mssfang avatar mssfang commented on May 23, 2024

@hind214875 Glad to see that works. BTW, we have a new beta, beta.7 released that includes some breaking change and new features Text-to-Speech.

from azure-sdk-for-java.

github-actions avatar github-actions commented on May 23, 2024

Hi @hind214875. 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.

from azure-sdk-for-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.