devika icon indicating copy to clipboard operation
devika copied to clipboard

More details on the API key set up

Open dwk601 opened this issue 11 months ago • 8 comments

API KEYS

BING: Your Bing Search API key for web searching capabilities.
GOOGLE_SEARCH: Your Google Search API key for web searching capabilities.
GOOGLE_SEARCH_ENGINE_ID: Your Google Search Engine Id for web searching using google.
OPENAI: Your OpenAI API key for accessing GPT models.
GEMINI: Your Gemini API key for accessing Gemini models.
CLAUDE: Your Anthropic API key for accessing Claude models.
MISTRAL: Your Mistral API key for accessing Mistral models.
GROQ: Your Groq API key for accessing Groq models.
NETLIFY: Your Netlify API key for deploying and managing web projects.

for these api keys can we get a link or more details for each api keys, where to get it?

dwk601 avatar Mar 31 '24 20:03 dwk601

Please help on this?

sockthem avatar Apr 03 '24 10:04 sockthem

Here are a few to get you all started:

  1. OPENAI API ACCESS KEY PAGE: https://platform.openai.com/api-keys
  2. CLAUDE API ACCESS KEY PAGE: https://console.anthropic.com/settings/keys
  3. GROQ API ACCESS KEY PAGE: https://console.groq.com/keys
  4. GEMINI API ACCESS KEY PAGE: https://aistudio.google.com/app/apikey
  5. GOOGLE_SEARCH API ACCESS KEY PAGES: https://developers.google.com/custom-search/v1/overview
  6. GOOGLE_SEARCH_ENGINE_ID PAGE: https://programmablesearchengine.google.com/controlpanel/all

Currently, integration with GROQ is still under development, so you can get some errors. If you don't have access to paid API resources, you can connect your own model from local host through ollama.

MrAnayDongre avatar Apr 04 '24 03:04 MrAnayDongre

playwright._impl._errors.Error: Protocol error (Page.navigate): Cannot navigate to invalid URL:

agent unable to perform google search even after putting both the google keys

sockthem avatar Apr 04 '24 08:04 sockthem

You can refer to the following YouTube video on setting up Google Search Engine and Google Search API: Link. Timestamp: 6:23 This should resolve your error.

MrAnayDongre avatar Apr 04 '24 08:04 MrAnayDongre

yep i followed the exact same path , but in the video you shared also he is mentioning about the same error. maybe its not fixed yet. please see till end.

sockthem avatar Apr 04 '24 09:04 sockthem

is search working for u perfectly @anay?

sockthem avatar Apr 04 '24 10:04 sockthem

is search working for u perfectly @anay?

sockthem avatar Apr 04 '24 10:04 sockthem

I confirm that I'm getting the same "Cannot navigate to invalid URL" error.

`Search Engine :: google Searching in Google...

Link ::

Exception in thread Thread-3 (): Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() File "/usr/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) File "/home/andrea/repos/devika/devika.py", line 96, in thread = Thread(target=lambda: agent.execute(message, project_name)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/andrea/repos/devika/src/agents/agent.py", line 348, in execute search_results = self.search_queries(queries, project_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/andrea/repos/devika/src/agents/agent.py", line 111, in search_queries browser, raw, data = loop.run_until_complete(self.open_page(project_name, link)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/home/andrea/repos/devika/src/agents/agent.py", line 72, in open_page await browser.go_to(pdf_download_url) File "/home/andrea/repos/devika/src/browser/browser.py", line 32, in go_to await self.page.goto(url, timeout=20000) File "/home/andrea/repos/devika/.venv/lib/python3.11/site-packages/playwright/async_api/_generated.py", line 8612, in goto await self._impl_obj.goto( File "/home/andrea/repos/devika/.venv/lib/python3.11/site-packages/playwright/_impl/_page.py", line 500, in goto return await self._main_frame.goto(**locals_to_params(locals())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/andrea/repos/devika/.venv/lib/python3.11/site-packages/playwright/_impl/_frame.py", line 145, in goto await self._channel.send("goto", locals_to_params(locals())) File "/home/andrea/repos/devika/.venv/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 59, in send return await self._connection.wrap_api_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/andrea/repos/devika/.venv/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 509, in wrap_api_call return await cb() ^^^^^^^^^^ File "/home/andrea/repos/devika/.venv/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 97, in inner_send result = next(iter(done)).result() ^^^^^^^^^^^^^^^^^^^^^^^^^ playwright._impl._errors.Error: Protocol error (Page.navigate): Cannot navigate to invalid URL`

andreabolandrina avatar Apr 05 '24 01:04 andreabolandrina

my error above was probably due to the link being empty. Not sure why though.

Anyway, it hasn't happened in the last 2 runs..

andreabolandrina avatar Apr 05 '24 16:04 andreabolandrina

issue of playwright Links are solved. and for the APIs follow the official docs.

ARajgor avatar Apr 20 '24 11:04 ARajgor