mirror of
https://github.com/lobehub/lobehub.git
synced 2026-09-20 04:56:13 +08:00
191f3fe776
* 📝 docs: fix outdated content across the docs site Audited docs/ against the current codebase and fixed stale content that drifted after major refactors (Clerk/NextAuth → Better Auth, src/server → apps/server, src/{config,envs,locales} → packages/*, model-bank updates). - self-hosting/auth: mark removed NextAuth/Clerk pages with deprecation warnings; fix microsoft/zitadel alias claims and the Logto callback path - environment-variables & advanced: correct wrong defaults (S3_SET_ACL, AI_IMAGE_DEFAULT_IMAGE_NUM, index/proxy URLs), drop non-existent env vars and fictional feature flags, fix OIDC config guidance - development: update refactored paths, Better Auth, .mjs configs, remove the MSW section (msw is not a dependency) - providers & model examples: replace retired model ids with in-bank ones; fix comfyui frontmatter corruption - usage: rename Moderator→Orchestrator, GTD→Task, correct shortcut keys, channel capability tables, Feishu/Lark WebSocket mode - platform/migration: fix dead links, docker service name, npx/npm → bun EN and zh-CN pairs updated together. * 📝 docs: fix Logto callback path and AUTH_SECRET deprecation guidance - Revert Logto/Sealos callback URLs to /api/auth/callback/logto to match the runtime SSO redirectURI override - Narrow legacy auth Callout: AUTH_SECRET remains required for Better Auth; mark NEXT_AUTH_SECRET as deprecated in zh-CN * 📝 docs: refresh agent skills for locales, env, auth, and agentRun paths Align OSS agent guidance with post-refactor layout: - packages/locales/src/default + bun run i18n - packages/env/src for env schemas (@/envs alias) - spa-auth shell + src/routes/auth segments - chat agentRun/transports/hetero instead of aiChat * 📝 docs: document APP_URL as required for Better Auth base URL Self-hosted auth uses appEnv.APP_URL as baseURL, not request-header auto-detection. NEXT_PUBLIC_AUTH_URL remains deprecated. * 📝 docs: note self-host search provider setup for web search Built-in lobe-web-browsing needs no client plugin, but self-hosted servers still require SEARCH_PROVIDERS / SEARXNG_URL (default SearXNG). * 📝 docs: point feature guide welcome UI at AgentHome Opening message/questions on the agent chat page live in src/features/AgentHome, not Onboarding WelcomeMessage.
65 lines
2.8 KiB
Plaintext
65 lines
2.8 KiB
Plaintext
---
|
||
title: 在 LobeHub 中使用 GitHub Models
|
||
description: 学习如何在 LobeHub 中配置和使用 GitHub 的 API Key,以便开始对话和交互。
|
||
tags:
|
||
- LobeHub
|
||
- GitHub
|
||
- GitHub Models
|
||
- API密钥
|
||
- Web UI
|
||
---
|
||
|
||
# 在 LobeHub 中使用 GitHub Models
|
||
|
||
<Image cover src={'/blog/assetsf117203c39294f45930785d85773c83e.webp'} />
|
||
|
||
[GitHub Models](https://github.com/marketplace/models) 是 GitHub 最近推出的一项新功能,旨在为开发者提供一个免费的平台来访问和实验多种 AI 模型。GitHub Models 提供了一个互动沙盒环境,用户可以在此测试不同的模型参数和提示语,观察模型的响应。该平台支持多种先进的语言模型,包括 OpenAI 的 GPT-4o、Meta 的 Llama 3.1 和 Mistral 的 Large 2 等,覆盖了从大规模语言模型到特定任务模型的广泛应用。
|
||
|
||
本文将指导你如何在 LobeHub 中使用 GitHub Models。
|
||
|
||
## GitHub Models 速率限制
|
||
|
||
当前 Playground 和免费 API 的使用受到每分钟请求数、每日请求数、每个请求的令牌数以及并发请求数的限制。若达到速率限制,则需等待限制重置后方可继续发出请求。不同模型(低、高及嵌入模型)的速率限制有所不同。 模型类型信息请参阅 GitHub Marketplace。
|
||
|
||
<Image alt={'GitHub Models 速率限制'} inStep src={'/blog/assets50607dece1bbffe80fdcbe76324ff9b6.webp'} />
|
||
|
||
<Callout type="note">
|
||
这些限制可能随时更改,具体信息请参考 [GitHub
|
||
官方文档](https://docs.github.com/en/github-models/prototyping-with-ai-models#rate-limits)。
|
||
</Callout>
|
||
|
||
---
|
||
|
||
## GitHub Models 配置指南
|
||
|
||
<Steps>
|
||
### 步骤一:获得 GitHub 的访问令牌
|
||
|
||
- 登录 GitHub 并打开 [访问令牌](https://github.com/settings/tokens) 页面
|
||
- 创建并设置一个新的访问令牌
|
||
|
||
<Image alt={'创建访问令牌'} inStep src={'/blog/assetsc376d2e9e97f9ea9d788589f0a9e23d6.webp'} />
|
||
|
||
- 在返回的结果中复制并保存生成的令牌
|
||
|
||
<Image alt={'保存访问令牌'} inStep src={'/blog/assets9880145be3e52b8f9dcd8343cd34a6ca.webp'} />
|
||
|
||
<Callout type={"warning"}>
|
||
请安全地存储访问令牌,因为它只会出现一次。如果您意外丢失它,您将需要创建一个新令牌。
|
||
</Callout>
|
||
|
||
### 步骤二:在 LobeHub 中配置 GitHub Models
|
||
|
||
- 访问 LobeHub 的`设置`界面
|
||
- 在`AI 服务商`下找到 `GitHub` 的设置项
|
||
|
||
<Image alt={'填入访问令牌'} inStep src={'/blog/assetse0d53ba2bfb6ba5bf33f2b8a547f4e41.webp'} />
|
||
|
||
- 填入获得的访问令牌
|
||
- 为你的 AI 助手选择一个 GitHub 的模型即可开始对话
|
||
|
||
<Image alt={'选择 GitHub 模型并开始对话'} inStep src={'/blog/assetsb6959f725c38f86053e4b07c9188d825.webp'} />
|
||
</Steps>
|
||
|
||
至此你已经可以在 LobeHub 中使用 GitHub 提供的模型进行对话了。
|