-
Notifications
You must be signed in to change notification settings - Fork 0
add day 12 #106
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
Merged
Merged
add day 12 #106
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
afedb37
Rename echokit-day-10-openrouter.md to 2025-12-03-echokit-day-10-open…
alabulei1 fd23b9b
Create 2025-12-05-echokit-day-12-grok.md
alabulei1 82e500a
Update doc/dev/2025-12-05-echokit-day-12-grok.md
alabulei1 a32a1c0
Update 2025-12-05-echokit-day-12-grok.md
alabulei1 bb13f92
Update doc/dev/2025-12-05-echokit-day-12-grok.md
alabulei1 abfd171
Update doc/dev/2025-12-05-echokit-day-12-grok.md
alabulei1 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
File renamed without changes.
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 |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| --- | ||
| slug: echokit-30-days-day-12-grok | ||
| title: "Day 12 — Switching EchoKit to Grok (with Built-in Web Search) | The First 30 Days with EchoKit" | ||
| tags: [echokit30days] | ||
| --- | ||
|
|
||
|
|
||
| # Day 12 — Switching EchoKit to Grok (with Built-in Web Search) | ||
|
|
||
| Over the past days, we’ve been exploring how EchoKit’s **ASR → LLM → TTS** pipeline works. We learned how to replace different ASR providers, and this week we shifted our focus to the **LLM** — the part that thinks, reasons, and decides how EchoKit should reply. | ||
|
|
||
| We have connected EchoKit to [OpenAI](https://echokit.dev/docs/dev/echokit-30-days-day-9-chatgpt) and [OpenRouter](https://echokit.dev/docs/dev/echokit-30-days-day-10-openrouter). | ||
| **Today, we’re trying something different: Grok — a super-fast LLM with built-in web search.** | ||
|
|
||
|
|
||
| ## Why Grok? | ||
|
|
||
| Grok, developed by X, stands out for a few practical reasons: | ||
|
|
||
| * **⚡ Extremely fast inference** | ||
| Great for voice AI agents like EchoKit. | ||
|
|
||
| * **🔍 Built-in web search** | ||
| Your device can answer questions using fresh information from the internet. | ||
|
|
||
| * **🔌 OpenAI-compatible API** | ||
| Minimizes changes — EchoKit can talk to it just like it talks to OpenAI. | ||
|
|
||
| For a small device that depends on fast responses, Grok is an excellent option. | ||
|
|
||
| ## How to Use Grok as Your LLM in EchoKit | ||
|
|
||
| All you need to do is update your `config.toml` of your EchoKit Server. | ||
| No code changes, no rewriting your server — just swap URLs and keys. | ||
|
|
||
| ### **1. Set Grok as the LLM provider** | ||
|
|
||
| In your `config.toml`, make sure the `[llm]` section points to Grok: | ||
|
|
||
| ```toml | ||
| [llm] | ||
| llm_chat_url = "https://api.x.ai/v1/chat/completions" | ||
| api_key = "YOUR_API_KEY" | ||
| model = "grok-4-1-fast-non-reasoning" | ||
| history = 5 | ||
| ``` | ||
|
|
||
| You can find your Grok API key in your **[xAI account dashboard](https://console.x.ai/)**. You will need to buy credits before using the Grok API. | ||
|
|
||
| Don't rush to close the `config.toml` window. | ||
|
|
||
| ### **2. Enable Grok’s Web Search** | ||
|
|
||
| This is the special part. | ||
|
|
||
| Add the following section in the `config.toml` file: | ||
|
|
||
| ```toml | ||
| [llm.extra] | ||
| search_parameters = { mode = "auto" } | ||
| ``` | ||
|
|
||
| `mode = "auto"` allows Grok to decide when it should fetch information from the web. | ||
| Ask anything news-related, trending, or timely — Grok will search when needed. | ||
|
|
||
| ### Restart the EchoKit server | ||
|
|
||
| After that, save these changes, and restart your EchoKit server. | ||
| > If your server is outdated, you'll need to recompile it from source. Support for Grok with built-in web search was added in a commit on December 5, 2025. | ||
|
|
||
| ## **Try It Out** | ||
|
|
||
| Press the K0 button to chat with EchoKit and try these prompts: | ||
|
|
||
| * “What’s the latest news in AI today?” | ||
| * “How’s the Bitcoin price right now?” | ||
| * “What's the current time in San Francisco?” | ||
|
|
||
| If everything is configured correctly, you’ll notice Grok pulling fresh information in its responses. | ||
| It feels different — the answers are more grounded in what’s happening *right now*. | ||
|
|
||
|
|
||
| Switching EchoKit to Grok was surprisingly simple — just a few lines in a config file. | ||
| Now my device can do real-time search when a question needs up-to-date info. | ||
|
|
||
| --- | ||
|
|
||
| If you want to share your experience or see what others are building with EchoKit + Grok: | ||
|
|
||
| * Join the **[EchoKit Discord](https://discord.gg/Fwe3zsT5g3)** | ||
| * Or share your latency tests, setups, and experiments — we love seeing them | ||
|
|
||
| Want to get your own EchoKit device? | ||
|
|
||
| * [EchoKit Box](https://echokit.dev/echokit_box.html) | ||
| * [EchoKit DIY Kit](https://echokit.dev/echokit_diy.html) | ||
|
|
||
|
|
||
Oops, something went wrong.
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.
Inconsistent configuration key naming. This file uses
llm_chat_urlwhile the OpenRouter documentation (doc/dev/2025-12-03-echokit-day-10-openrouter.md:45) useschat_urlfor the same purpose. These should be consistent across the documentation to avoid confusion.