Spaces:
Configuration error
Download docs/modules/usage/how-to/gui-mode.md from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 5 kB
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/docs/modules/usage/how-to/gui-mode.md
- Command line
-
hf download hf://spaces/flyingdarkdev/README/docs/modules/usage/how-to/gui-mode.md
-
curl -L -o gui-mode.md https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/docs/modules/usage/how-to/gui-mode.md
GUI Mode
OpenHands provides a Graphical User Interface (GUI) mode for interacting with the AI assistant.
Installation and Setup
- Follow the installation instructions to install OpenHands.
- After running the command, access OpenHands at http://localhost:3000.
Interacting with the GUI
Initial Setup
- Upon first launch, you'll see a settings page.
- Select an
LLM ProviderandLLM Modelfrom the dropdown menus. If the required model does not exist in the list, toggleAdvancedoptions and enter it with the correct prefix in theCustom Modeltext box. - Enter the corresponding
API Keyfor your chosen provider. - Click
Save Changesto apply the settings.
GitHub Token Setup
OpenHands automatically exports a GITHUB_TOKEN to the shell environment if it is available. This can happen in two ways:
Local Installation: The user directly inputs their GitHub token.
Setting Up a GitHub Token
- Generate a Personal Access Token (PAT):
- On GitHub, go to Settings > Developer Settings > Personal Access Tokens > Tokens (classic).
- New token (classic)
- Required scopes:
repo(Full control of private repositories)
- Fine-Grained Tokens
- All Repositories (You can select specific repositories, but this will impact what returns in repo search)
- Minimal Permissions ( Select Meta Data = Read-only read for search, Pull Requests = Read and Write, Content = Read and Write for branch creation)
- Enter Token in OpenHands:
- Click the Settings button (gear icon).
- Navigate to the
GitHub Settingssection. - Paste your token in the
GitHub Tokenfield. - Click
Save Changesto apply the changes.
Organizational Token Policies
If you're working with organizational repositories, additional setup may be required:
- Check Organization Requirements:
- Organization admins may enforce specific token policies.
- Some organizations require tokens to be created with SSO enabled.
- Review your organization's token policy settings.
- Verify Organization Access:
- Go to your token settings on GitHub.
- Look for the organization under
Organization access. - If required, click
Enable SSOnext to your organization. - Complete the SSO authorization process.
Troubleshooting
Common issues and solutions:
Token Not Recognized:
- Ensure the token is properly saved in settings.
- Check that the token hasn't expired.
- Verify the token has the required scopes.
- Try regenerating the token.
Organization Access Denied:
- Check if SSO is required but not enabled.
- Verify organization membership.
- Contact organization admin if token policies are blocking access.
Verifying Token Works:
- The app will show a green checkmark if the token is valid.
- Try accessing a repository to confirm permissions.
- Check the browser console for any error messages.
OpenHands Cloud: The token is obtained through GitHub OAuth authentication.
OAuth Authentication
When using OpenHands Cloud, the GitHub OAuth flow requests the following permissions:
- Repository access (read/write)
- Workflow management
- Organization read access
To authenticate OpenHands:
- Click
Sign in with GitHubwhen prompted. - Review the requested permissions.
- Authorize OpenHands to access your GitHub account.
- If using an organization, authorize organization access if prompted.
Advanced Settings
- Inside the Settings page, toggle
Advancedoptions to access additional settings. - Use the
Custom Modeltext box to manually enter a model if it's not in the list. - Specify a
Base URLif required by your LLM provider.
Interacting with the AI
- Type your prompt in the input box.
- Click the send button or press Enter to submit your message.
- The AI will process your input and provide a response in the chat window.
- You can continue the conversation by asking follow-up questions or providing additional information.
Tips for Effective Use
- Be specific in your requests to get the most accurate and helpful responses, as described in the prompting best practices.
- Use the workspace panel to explore your project structure.
- Use one of the recommended models, as described in the LLMs section.
Remember, the GUI mode of OpenHands is designed to make your interaction with the AI assistant as smooth and intuitive as possible. Don't hesitate to explore its features to maximize your productivity.