MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.22k stars 21.38k forks source link

Can't select Azure AI Search service #121612

Closed MarcGiannuzzi closed 2 months ago

MarcGiannuzzi commented 5 months ago

Hi,

While trying to create an index for my Mistral AI deployment, I am facing this issue: The dropdown below "Select Azure AI Search service" does not display any AI search service.

However I do have one. That AI search service is being used in the Open AI Azure service (oai.azure.com) and the connnection works well. Thus, wether it is a Mistral AI deployment, or a Open AI deployment, I just can't connect both of those to my search ai service index.

Please can you provide some feedback on why the search service is not displayed ?

image

Also, I am very interested to know how to do the same actions with some python implementation. Note: (I can communicate with the LLM, but that one does not focus on my actual data in Azure AI Studio, python)

Thank you for your response,


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

TPavanBalaji commented 5 months ago

@MarcGiannuzzi Thanks for your feedback! We will investigate and update as appropriate.

hp1911 commented 5 months ago

I am facing the exact same issue.

image

Any resolution? I've created an Azure AI Search Service, it doesn't show up though.

Naveenommi-MSFT commented 5 months ago

@MarcGiannuzzi Thank you for bringing this to our attention. I've delegated this to content author @eric-urban, who will review it and offer their insightful opinions.

Naveenommi-MSFT commented 5 months ago

@eric-urban Could you please review add comments on this, update as appropriate.

levyuk commented 5 months ago

I'm also having this issue which previously didn't occur. Happens with a new ai project and new search service in a new resource group.

absolute-tk commented 5 months ago

IMG_2897 This happens to my first ever project. From previous comments, I guess I did nothing wrong.🙂

hp1911 commented 5 months ago

Okay I found out the solution (what worked for me), it was very simple fix by going to Project Settings -> Adding Connection of Azure AI Search. Hope it helps!

image
absolute-tk commented 5 months ago

Okay I found out the solution (what worked for me), it was very simple fix by going to Project Settings -> Adding Connection of Azure AI Search. Hope it helps!

image

This works!!!🤩

MarcGiannuzzi commented 5 months ago

Hi,

Thank you @hp1911 for your answer !

However I am still having trouble connecting my deployment to my search index:

image

AI Studio seems to not be able to connect to the search index data.

Is the same for you ?

justuswolff-audit commented 5 months ago

@MarcGiannuzzi I am facing exactly the same issue and couldn't find a way to resolve it? Did you find a solution?

MarcGiannuzzi commented 5 months ago

Hi @justuswolff-audit ,

Nope, still struggling to connect the search service to the deployment; the selection of the index seems impossible.

Did someone success in doing that ?

justuswolff-audit commented 5 months ago

I looked into it and found following issue:

Screenshot 2024-04-25 at 11 01 00

It looks like the base url is not added correctly for the API call. I got the API call to run in postman with this base url: [service-name].search.windows.net/. Where would I open an issue for that @eric-urban?

alexisfcote commented 5 months ago

Same issue here image

caleb-collar commented 5 months ago

Also having the same issue as @alexisfcote & @MarcGiannuzzi

I will mention that my Azure AI search is on the free tier.

justuswolff-audit commented 5 months ago

FYI: Started working for me just now.

MarcGiannuzzi commented 5 months ago

Hi @justuswolff-audit ,

I can also choose my azure search index now, thank you for your notification !

However, when sending a request, the /completions API return 500 error.

Is it the same for you ?

Also, does anyone has some example of how to use the same connection with the Python SDK ?

justuswolff-audit commented 5 months ago

Hi @MarcGiannuzzi, for me it is still creating the index which is kind of odd. I guess it is still not working as expected. I started using the Python API as well, that seems to work. See the code below :)

import os

from dotenv import load_dotenv
from openai import AzureOpenAI

load_dotenv()

deployment = "gpt-35-turbo-16k"

client = AzureOpenAI(
    azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
    api_key=os.getenv("AZURE_OPENAI_API_KEY"),
    api_version="2024-02-01",
)

completion = client.chat.completions.create(
    model=deployment,
    messages=[
        {
            "role": "system",
            "content": """
            You are a useful assistant. 
            """,
        },
        {
            "role": "user",
            "content": "Hi",
        },
    ],
    extra_body={
        "data_sources": [
            {
                "type": "azure_search",
                "parameters": {
                    "endpoint": os.environ["AZURE_AI_SEARCH_ENDPOINT"],
                    "index_name": os.environ["AZURE_AI_SEARCH_INDEX"],
                    "authentication": {
                        "type": "api_key",
                        "key": os.environ["AZURE_AI_SEARCH_API_KEY"],
                    },
                },
            }
        ],
    },
)

Hope this helps!

eric-urban commented 2 months ago

please-close