-
Notifications
You must be signed in to change notification settings - Fork 2.5k
search_engine.md #643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shvynu
wants to merge
1
commit into
stitionai:main
Choose a base branch
from
shvynu:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
search_engine.md #643
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,53 @@ | ||
# search Engine setup | ||
# Search Engine Setup for Devika | ||
|
||
To use the search engine capabilities of Devika, you need to set up the search engine API keys. Currently, Devika supports Bing, Google and DuckDuckGo search engines. If you want to use duckduckgo, you don't need to set up any API keys. | ||
Devika supports three search engines: **Bing**, **Google**, and **DuckDuckGo**. While **DuckDuckGo** does not require any API keys, **Bing** and **Google** do. Follow the steps below to set up the API keys for Bing and Google. | ||
|
||
For Bing and Google search engines, you need to set up the API keys. Here's how you can do it: | ||
## 1. Bing Search API Setup | ||
|
||
## Bing Search API | ||
- Create Azure account. You can create a free account [here](https://azure.microsoft.com/en-us/free/). | ||
- Go to the [Bing Search API](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api) website. | ||
- click on the `Try now` button. | ||
- Sign in/sign up with your Azure account. | ||
- Create a new resource group (if you don't have any). | ||
 | ||
- click on the `Review and create` button. | ||
- if everything is fine, click on the `Create` button. | ||
### Step 1: Create an Azure Account | ||
- Visit the [Azure website](https://azure.microsoft.com/en-us/free/) and create a free account. | ||
|
||
### Step 2: Access the Bing Search API | ||
- Go to the [Bing Search API](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api) page. | ||
- Click on the `Try now` button. | ||
- Sign in or sign up using your Azure account. | ||
|
||
### Step 3: Create a Resource Group | ||
- If you don't have a resource group, create one during the setup process. | ||
|
||
### Step 4: Create a Bing Search API Resource | ||
- Fill in the necessary details for your Bing Search API resource. | ||
- Click on the `Review and create` button. | ||
- If everything is correct, click on the `Create` button. | ||
|
||
### Step 5: Retrieve Your API Keys and Endpoint | ||
- Once the resource is created, go to the `Keys and Endpoint` tab. | ||
 | ||
- Copy either `Key1` or `Key2` and paste it into the `API_KEYS` field with the name `BING` in the `config.toml` file located in the root directory of Devika, or you can set it via the UI. | ||
-  | ||
- Copy either `Key1` or `Key2`. | ||
- Paste the key into the `API_KEYS` field with the name `BING` in the `config.toml` file located in the root directory of Devika, or you can set it via the UI. | ||
- Copy the `Endpoint` and paste it into the `API_Endpoints` field with the name `BING` in the `config.toml` file located in the root directory of Devika, or you can set it via the UI. | ||
|
||
## 2. Google Search API Setup | ||
|
||
### Step 1: Create a Google Cloud Project | ||
- If you don't have one, create a Google Cloud Project via the [Google Cloud Console](https://console.cloud.google.com/). | ||
|
||
### Step 2: Enable the Custom Search API | ||
- Visit the [Google Custom Search API Documentation](https://developers.google.com/custom-search/v1/overview). | ||
- Click on `Get a Key`. | ||
- Select your project or create a new one. | ||
-  | ||
- This will enable the Custom Search API for your project and generate an API key. | ||
|
||
### Step 3: Retrieve Your API Key | ||
- Copy the API key. | ||
- Paste it in the `API_KEYS` field with the name `GOOGLE_SEARCH` in the `config.toml` file located in the root directory of Devika, or you can set it via the UI. | ||
|
||
### Step 4: Create a Custom Search Engine | ||
- Go to the [Google Custom Search Engine](https://programmablesearchengine.google.com/controlpanel/all) website. | ||
- Click on the `Add` button to create a new search engine. | ||
-  | ||
- After creating the engine, copy the `Search Engine ID`. | ||
- Paste it in the `API_Endpoints` field with the name `GOOGLE_SEARCH_ENGINE_ID` in the `config.toml` file located in the root directory of Devika, or you can set it via the UI. | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove this extra backticks |
||
|
||
## Google Search API | ||
- if don't have then create GCP account [Google Cloud Console](https://console.cloud.google.com/). | ||
- visit [Here](https://developers.google.com/custom-search/v1/overview) is the official documentation. | ||
- click on `Get a Key`. | ||
- select the project you have or create a new project. click on next. | ||
 | ||
- it enable the Custom Search API for the project and create the API key. | ||
- Copy the API key and paste it in the API_KEYS field with the name `GOOGLE_SEARCH` in the `config.toml` file in the root directory of Devika or you can set it via UI. | ||
- for the search engine id, go to the [Google Custom Search Engine](https://programmablesearchengine.google.com/controlpanel/all) website. | ||
- click on the `Add` button. | ||
 | ||
- After creating the engine. Copy the `Search Engine ID` and paste it in the API_Endpoints field with the name `GOOGLE_SEARCH_ENGINE_ID` in the `config.toml` file in the root directory of Devika or you can set it via UI. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mention that you can update via UI. not to change
config.toml