mishl-dev / Discord-AI-Chatbot

This Discord chatbot is incredibly versatile. Powered incredibly fast Groq API
GNU Affero General Public License v3.0
1.32k stars 417 forks source link

internet search not working #241

Closed luciimon closed 7 months ago

luciimon commented 1 year ago

An error occurred during the search request: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://ddg-api.herokuapp.com/search?query=...?&limit=0')

elricsilverhandx commented 8 months ago

When you make a call it will give an error. If you write this error, we will write you the solution.

luciimon commented 8 months ago

{'message': 'Repl not found. If you believe this is a mistake, try logging in to Replit first.', 'name': 'NotFoundError', 'status': 404}

URL : https://ddg-api.awam.repl.co/api/search

ai_utils.py

if search_query is not None: try: async with aiohttp.ClientSession() as session: async with session.get('https://ddg-api.awam.repl.co/api/search', params={'query': search_query, 'maxNumResults': search_results_limit}) as response: search = await response.json()

elricsilverhandx commented 8 months ago

{'message': 'Repl not found. If you believe this is a mistake, try logging in to Replit first.', 'name': 'NotFoundError', 'status': 404}

URL : https://ddg-api.awam.repl.co/api/search

ai_utils.py

if search_query is not None: try: async with aiohttp.ClientSession() as session: async with session.get('https://ddg-api.awam.repl.co/api/search', params={'query': search_query, 'maxNumResults': search_results_limit}) as response: search = await response.json()

API is down, we will create a new API connection in the next update.