Tutorial: Using External AI (like Gemini) in MyRobot via Fount (Updated)
This guide explains how to connect a web-based AI API, such as Google Gemini, to the MyRobot game using the 'fount' application. This allows you to leverage powerful external AI services (which may be free or offer alternative capabilities) instead of relying solely on MyRobot's built-in options or running resource-intensive local models.
Prerequisites:
- MyRobot installed.
- A stable internet connection.
- The
fountapplication (installation steps below).
Before you begin, it's helpful to understand the differences between using fount with an external AI and running a Large Language Model (LLM) locally on your computer:
| Feature | Fount (with External AI) | Local LLM |
|---|---|---|
| Disk Space | ~200 MB (for fount) | 4-5 GB+ (depending on model size) |
| Intelligence | Potentially higher (access to powerful online models like Gemini). | Varies by model; often sufficient for basic conversation but typically less capable than top-tier online models. |
| Running Requirements | Requires a stable internet connection; very low local resource usage (CPU/RAM). | Works offline; Requires significant VRAM (GPU memory) and GPU processing power for good performance. |
| Configuration | Slightly more complex setup (API keys, fount config), but generally straightforward. | Varies; initial setup can be simpler but often involves downloading large model files. |
In summary: Use fount if you have a reliable internet connection and want access to potentially more powerful AI without heavily taxing your own hardware. Use a local LLM if you need offline capability or prefer a self-contained solution, provided your computer has sufficient VRAM and GPU power. This guide focuses on the fount method.
-
Download and install the fount application from its official repository: https://github.com/steve02081504/fount
- The installation typically requires about 200MB of disk space.
-
Once installed, launch the fount application.
-
Important: Fount must remain running in the background while you intend to use the external AI connection in MyRobot.
This step tells Fount which external AI service to use, such as Gemini or Cohere.
-
In the running fount application, find and click on Manage AI Sources. This option is usually located in the upper right corner of the main window.
-
Click the New button to create a configuration for your external AI service.
-
Fill in the required details for your chosen AI service:
- Name: Assign a clear and memorable name (e.g.,
gemini-free). - API Key: Enter the API key provided by your AI service. Treat this key like a password and keep it secure.
- Other Settings: Configure any additional fields as required by the specific AI provider.
- Looking for a Free AI Source? You can often obtain free API keys from services like:
- Google AI Studio (for Gemini)
- Cohere
- Follow the instructions on their websites to generate your key.
- Name: Assign a clear and memorable name (e.g.,
-
Save the AI source configuration within fount. You can then close the AI Sources window.
In this step, you will get the specific URL and API key that MyRobot will use to talk to Fount.
-
In the main Fount window, navigate to the As Proxy section. This might be a tab or button on the main interface. The page should look like the image provided, titled "As Proxy".
-
On this page, you will find two crucial pieces of information:
- API Endpoint: This is the base URL. It should be
http://localhost:8931/api/shells/proxy/calling/openai. - Your API Key: This is a long string of characters generated by Fount itself. This is different from the Gemini/Cohere key you entered in Step 2.
- API Endpoint: This is the base URL. It should be
-
For applications like MyRobot that may not support setting a custom authorization header, you must use the combined URL that includes the API key as a parameter. Fount provides a pre-formatted URL for this purpose under the section "Cannot set APIKey in request header? (insecure)".
-
Copy the complete URL from this last section. It will look like this:
http://localhost:8931/api/shells/proxy/calling/openai?fount-apikey=xxxxxxxxxxxxxxxx(where 'xxxxxxxx' is your actual Fount API Key).
-
Ensure the fount application is still running in the background.
-
Launch MyRobot and enter the game world.
-
Press the
ESCkey to open the main menu or settings panel. -
Navigate to the section for AI Source Settings (the exact menu name might vary slightly).
-
In the input field for the AI source address or endpoint, paste the entire URL you copied from the Fount API Gateway in Step 3.
-
Example: The complete URL you paste into MyRobot should look exactly like this, but with your own key:
http://localhost:8931/api/shells/proxy/calling/openai?fount-apikey=fkey-abc123def456ghi789jkl(Note:
localhostrefers to your own computer where fount is running). -
Apply or save these settings within MyRobot.
Completion:
That's it! MyRobot will now send its AI requests to the Fount API Gateway URL. Fount will then securely relay these requests to the external AI service (like Google Gemini) that you configured in Step 2.
Troubleshooting Tips:
- Is fount running?
- Is the URL pasted into MyRobot exactly the one from the Fount API Gateway, including the
?fount-apikey=part? - Is your internet connection active?
- Did you save an AI Source configuration correctly in Fount (Step 2) with a valid API key from your AI provider?
Enjoy using your chosen external AI in MyRobot!
P.S.
Thanks to the MyRobot developers! :)
