跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.agipower.ai/llms.txt

Use this file to discover all available pages before exploring further.

AGIPower 与 Neovate 的集成指南

Neovate Code 是一个开源的 AI 驱动代码助手,支持多种 AI 模型提供者。通过将 AGIPower 集成到 Neovate Code 中,用户可以访问多个 AI 模型,提升代码生成和辅助编程的能力。

配置方式

AGIPower 提供两种配置方式以适应不同的部署场景:

方法一:环境变量(推荐)

最简单的配置方式是使用 AGIPower_API_KEY 环境变量:
export AGIPower_API_KEY=your_api_key_here
Windows 用户:
set AGIPower_API_KEY=your_api_key_here

方法二:配置文件(针对旧版)

对于需要更复杂配置或从旧版本迁移的用户,AGIPower 支持使用配置文件:
{
  "agipower": {
    "apiKey": "your_api_key_here",
    "api": "https://api.agipower.ai/v1"
  }
}
更多细节请参阅 Neovate 配置文档

集成步骤

  1. 安装 Neovate Code(如果尚未安装):
    npm install -g @neovate/code
    
  2. 配置 AGIPower API Key
    export AGIPower_API_KEY=your_api_key
    
  3. 启动 Neovate
    neovate
    # 或者
    neo
    
  4. 选择 AGIPower 提供者
    /login
    # 在提供者列表中选择 AGIPower
    
  5. 选择模型
    /model
    # 从可用的 AGIPower 模型中选择
    

可用功能

配置完成后,你可以通过 Neovate Code 使用 AGIPower 的模型能力:
  • 代码生成:生成代码片段和完整函数
  • 修复 Bug:识别并解决代码问题
  • 代码审查:获得智能的代码审查建议
  • 测试生成:生成全面的单元测试
  • 代码重构:优化并重构现有代码

使用示例

# Generate error handling
"Add comprehensive error handling to the user authentication service"

# TypeScript migration
"Convert this JavaScript module to TypeScript with proper type definitions"

# Testing
"Create unit tests for the payment processing module with edge cases"

# Performance optimization
"Optimize this SQL query for better performance with large datasets"

使用 AGIPower 的好处

  • 模型多样性:通过单一接口访问多个 AI 模型
  • 成本优化:可根据性能和价格比较并选择模型
  • 高可用性:跨多个模型提供商的冗余保障
  • 统一 API:无论底层模型如何,接口保持一致

支持

如果遇到 AGIPower 相关问题: 如果遇到 Neovate 集成问题: