Open cetmca opened 3 weeks ago
Ah, the SERVICE env vars should only be the service name, not the full endpoint. I construct the endpoint in the code:
For example, mine looks like:
AZURE_OPENAI_SERVICE="evaldjgxrh3u7sxlu-openai" AZURE_SEARCH_SERVICE="gptkb-xw55anu4yrb3k"
Now getting the forbidden response, can you please suggest
File "C:\ragevaluator.venv\Lib\site-packages\azure\search\documents_generated\operations_documents_operations.py", line 756, in search_post raise HttpResponseError(response=response, model=error) azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden'
On Tue, Jun 11, 2024 at 12:48 PM Pamela Fox @.***> wrote:
Ah, the SERVICE env vars should only be the service name, not the full endpoint. I construct the endpoint in the code:
For example, mine looks like:
AZURE_OPENAI_SERVICE="evaldjgxrh3u7sxlu-openai" AZURE_SEARCH_SERVICE="gptkb-xw55anu4yrb3k"
— Reply to this email directly, view it on GitHub https://github.com/Azure-Samples/ai-rag-chat-evaluator/issues/93#issuecomment-2161206872, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHE7VPLEQWXMSNMP6ST4LTZG4S7RAVCNFSM6AAAAABJEWXCW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGIYDMOBXGI . You are receiving this because you authored the thread.Message ID: @.***>
Hm, is your search service setup with role-based access control for the currently logged in user?
Its not role based, I just enabled more logs and see the search service itself is not retrieving the response(empty response)
how can we test that ?
I tested with a standalone script and it is working fine,i am getting the response from our search
r = search_client.search("", top=1000) ## this response is empty.
qa: list[dict] = []
for doc in r:
if len(qa) > num_questions_total:
break
## logger.info("Processing search document %s", doc["sourcepage"])
logger.info("test - line 3666666666",doc)
Error -
r = search_client.search("", top=1000) ## this response is empty.
qa: list[dict] = [] for doc in r: if len(qa) > num_questions_total: break
logger.info("test - line 3666666666",doc)
any thought @pamelafox ?? hardcoded the end points in return SearchClient(), and still it is not working. But Like i said, standalone code works fine with the same end points and below is returning the value.
results = search_client.search("", top=10)
I am getting the below error like this, any thoughts
File "C:\ragevaluator.venv\Lib\site-packages\azure\core\pipeline\transport_requests_basic.py", line 401, in send raise error azure.core.exceptions.ServiceRequestError: <urllib3.connection.HTTPSConnection object at 0x00000244F06ABA10>: Failed to resolve 'https' ([Errno 11001] getaddrinfo failed)
my .env looks like this
OPENAI_HOST="azure" OPENAI_GPT_MODEL="gpt-35"
For Azure OpenAI only:
AZURE_OPENAI_EVAL_DEPLOYMENT="gpt-35-turbo" AZURE_OPENAI_SERVICE="https://openai-xxxxxzammoai-dev-xxxx.openai.azure.com/" AZURE_OPENAI_KEY="42db2466e"
For generating QA based on search index:
AZURE_SEARCH_SERVICE="https://acxxs-xxxxx-311zammoai-dev.search.windows.net" AZURE_SEARCH_INDEX="index-xxxx-zmobot-dev" AZURE_SEARCH_KEY=""