Git Product home page Git Product logo

gpt-azure-search-engine's People

Contributors

amitmukh avatar dantelmomsft avatar erjadi avatar filipefumaux avatar giorgiosaez avatar github-actions[bot] avatar juliaashleyh8 avatar keayoub avatar lordaouy avatar maurominella avatar pablomarin avatar sethsteenken avatar tbunkley avatar tectonia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gpt-azure-search-engine's Issues

KeError when submitting QuickAnswer or BEst Answer button

KeyError: 'value'
Traceback:
File "/tmp/8db30dc93843905/antenv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/tmp/8db30dc93843905/app/main.py", line 116, in
for result in search_results['value']:
image

Create Indexer REST API Call Fails with Data Source Auth Issue

Rest API call to create indexer in 01-Load-Data-ACogSearch.ipynb with the default arxivcs container with:

"error":{"code":"","message":"Error with data source: Credentials provided in the connection string are invalid or have expired.\r\nFor more information on troubleshooting connection issues to Azure Storage accounts, please see https://go.microsoft.com/fwlink/?linkid=2049388 Please adjust your data source definition in order to proceed."

Potentially a firewall issue but couldn't troubleshoot locally. SAS Token Auth also fails in Storage Explorer.

Cannot hit the chatbot programmatically using Python

Hello,

I'm trying to develop the following Python program that would hit the created Bot Service programmatically

import requests
import time


direct_line_secret = "XXXXX"
base_url = "https://directline.botframework.com/v3/directline"

# Start a conversation
start_conversation_url = f"{base_url}/conversations"
headers = {
    "Authorization": f"Bearer {direct_line_secret}"
}

response = requests.post(start_conversation_url, headers=headers)
conversation_id = response.json()["conversationId"]
print('Converstion id:', conversation_id)

# Send a message to the bot
send_message_url = f"{base_url}/conversations/{conversation_id}/activities"
message = {
    "type": "message",
    "from": {"id": "user"},
    "text": "what is Reinforcement Learning?"
}

response = requests.post(send_message_url, headers=headers, json=message)
print(response.status_code)
print(response.text)

# Poll for the bot's response
get_activities_url = f"{base_url}/conversations/{conversation_id}/activities"

while True:
    response = requests.get(get_activities_url, headers=headers)
    activities = response.json()["activities"]
    print(activities)
    for activity in activities[::-1]:
        if activity["from"]["id"] == "bot_id":  # Replace "your_bot_id" with the actual bot's ID
            print("Bot's response:", activity["text"])
            exit()  # or break the loop if you only want the latest message

    # Wait for a while before polling again
    time.sleep(1)

However, it gives me Bot's response: To continue to run this bot, please fix the bot source code. but Test in Web Chat works just fine. Also checking the logs I saw the following:

  File "/tmp/8dbd09dbf228fa9/antenv/lib/python3.10/site-packages/botbuilder/core/middleware_set.py", line 79, in receive_activity_internal
    return await callback(context)
  File "/tmp/8dbd09dbf228fa9/antenv/lib/python3.10/site-packages/botbuilder/core/activity_handler.py", line 70, in on_turn
    await self.on_message_activity(turn_context)
  File "/tmp/8dbd09dbf228fa9/bot.py", line 74, in on_message_activity
    input_text_metadata["local_timestamp"] = turn_context.activity.local_timestamp.strftime("%I:%M:%S %p, %A, %B %d of %Y")
AttributeError: 'NoneType' object has no attribute 'strftime'

Is there anything I'm doing wrong in the code and I do not pass the parameters correctly or there is an issue in bot's code?

Citations for sites indexed via CSV

Hi Pablo, can you provide any guidance around how you configured the web app to structure and citate the URL for the sites in the ncbi data set? Also, if you have any guidance on how you built the CSV from the ncbi website. Looking to do something similar for ServiceNow KB articles. Any input would be greatly appreciated! Awesome project.

HTTP status code NotFound at Backend Bot service

I'm trying to deploy my backend and fronted webiste to Azure App Services and Bot Service, however, the frontend website was successfully deployed but the backend doesn't. The bakend is not wokring with error There was an error sending this message to your bot: HTTP status code NotFound, it's both not working with Web Chat and Direct Line.
I've passed all the notebook files successfully but troubled while deploying to App Service, please help and thanks.
image

Validation failed. View error details

Hi,

I tried to deploy with the custom template to create all the Azure Infrastructure needed to run the Notebooks (Azure Cognitive Search, Cognitive Services, SQL Database, CosmosDB, Bing Search API), but I got the following error message.

"InvalidTemplateDeployment: The template deployment 'MicrosoftTemplate' is not valid according to the validation procedure. The tracking id is '2d765e2c-4e79-4062-a78a-c26e02d13xxx. See inner errors for details.

Does anyone have the same problem before? Thanks

AttributeError: 'NoneType' object has no attribute 'get'

Hi All,

Running 01-Lod-Data-AcogSearch.ipynb

Change these below with your own services credentials

AZURE_SEARCH_ENDPOINT = "" <= URL of Search Service
AZURE_SEARCH_KEY = " " <= Keys Manage admin keys
COG_SERVICES_NAME = "" <= name of search service, e.g cog-search-xxxx
COG_SERVICES_KEY = "" <= cog-search-xxxx , this is manage query keys

I have added like the above and
400 false


AttributeError Traceback (most recent call last)
Cell In[27], line 6
4 # pprint(json.dumps(r.json(), indent=1))
5 print(r.status_code)
----> 6 print("Status:",r.json().get('lastResult').get('status'))
7 print("Items Processed:",r.json().get('lastResult').get('itemsProcessed'))
8 print(r.ok)

AttributeError: 'NoneType' object has no attribute 'get'. anyone seen this erro ?

Can i run only note book 7 and deploy to check bing API

Can I run only note book 7 and deploy to check bing API.
What are the steps to do it.
As per ReadmMe it says it is built on running all the notebooks in order. Is it possible to deploy only notebook 7 features.
Please let me know what are the steps
I am able to run Notebook 7 on visual studio notebook.
But for testing purposes it need to be deployed right ? What is the procedure ?

AttributeError: 'str' object has no attribute 'items'

I tried to follow the guide, did the pip install based on the requirements file and ran the "streamlit Home.py" command. However, I am getting this error: Traceback (most recent call last):
File "/home/linuxbrew/.linuxbrew/bin/streamlit", line 8, in
sys.exit(main())
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.9/site-packages/streamlit/web/cli.py", line 177, in main_run
bootstrap.load_config_options(flag_options=kwargs)
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.9/site-packages/streamlit/web/bootstrap.py", line 342, in load_config_options
config.get_config_options(force_reparse=True, options_from_flags=options_from_flags)
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.9/site-packages/streamlit/config.py", line 1144, in get_config_options
_update_config_with_toml(file_contents, filename)
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.9/site-packages/streamlit/config.py", line 1025, in _update_config_with_toml
for name, value in options.items():
AttributeError: 'str' object has no attribute 'items'

Can't deploy App Service

  • Trial 1: az webapp deployment, Git Actions, Local git
    ==> Got azure deploy deployment conflict (code: 409)

  • Trial 2: create template on portal
    ==> Got timeout

Test commit hash: 2c10f7b

Playing with the model, interesting outcome...

Playing with the Streamlit model, I was asking the recommended question "list the authors that talk about Boosting Algorithms" and I got (what I assume) is the expected response - "The authors that talk about Boosting Algorithms are Ninan Sajeeth Philip and K. Babu Joseph, and Schapire.". However, if I start asking about dates, it doesn't return anything... such as: "How do Ninan Sajeeth Philip papers relate to booting algorithms?" or "when did Ninan Sajeeth Philip write papers relating to booting algorithms?".

The model doesn't seem to know anything about dates. Does this have to do with how the data model was built?

Missing credentials.py

On 01-Load-Data-ACogSearch.ypynb it mentions a credentials.py on the directory app:
"Create a data source
You should already have a blob container that contains the sample data, see app/credentials.py"
That file doesn't seem to be present anywhere.

Backend Webapp not able to spinup

While deploying earlier backend webapp was failing with container crash issue being exception: ModuleNotFoundError: No Module named ‘aiohttp’. When I redeployed again with python 3.10 this issue is resolved.

As of now container is not crashing and getting following warning:

File "/tmp/8db6d8a271372eb/antenv/lib/python3.10/site-packages/botbuilder/core/integration/aiohttp_channel_service_exception_middleware.py", line 20, in aiohttp_error_middleware
response = await handler(request)
File "/tmp/8db6d8a271372eb/antenv/lib/python3.10/site-packages/aiohttp/web_urldispatcher.py", line 931, in _handle
raise self._http_exception
aiohttp.web_exceptions.HTTPNotFound: Not Found
Task exception was never retrieved
future: exception=KeyError('access_token')>. These exceptions are coming from application. Any help in this regard would be much apprciated..Thanks:-)

Bing search for the demo link

Excellent architecture and description on the work flow / Read me. Thanks for providing details and quick resolutions I have a quick question.
I am trying to do a bing search in the demo link provided.
I am getting the following information. Can you please let me know how to test the demo link for bing search
I am getting the following attached answers for bing search. Looks like it does Cognitive search alone on the internal data and hence does not provide the answer from the internet
Bing Search

credentials exposed

Great service, but looks like you're exposing your keys checking in credentials.py

SAS TOKEN Unable to find

Not data returned from Azure Search, check connection..

name 'content' is not defined

KeyError: 'chunk'
Traceback:
File "/tmp/8dbb8b7be883dca/antenv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/tmp/8dbb8b7be883dca/pages/1_Search.py", line 130, in
top_docs.append(Document(page_content=value["chunk"], metadata={"source": location+os.environ['BLOB_SAS_TOKEN']}))

Timeout after 15s, 502 Error GATEWAY TIMEOUT

Hello,

Tested all notebooks and ran fine, deployed the backend web app with no errors but when testing it i get 'To continue to run this bot, please fix the bot source code. ' WHen i look at the Bot channels, both direct line & web chat have the same message for healthy status(issues): 'There was an error sending this message to your bot: HTTP status code GatewayTimeout' & when i do inspect in browser i see the POST call https://directline.botframework.com/v3/directline/conversations/XYZ-eu/activities with response:
{
"error": {
"code": "BotError",
"message": "Failed to send activity: bot timed out"
},
"httpStatusCode": 504
}

The same bot works in teams, but not in the frontend app, i also looked at all the backend webapp & frontend webapp configuration and checked all the values, including the BOT_DIRECTLINE_SECRET_KEY and it`s correct

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.