ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    Azure openai api 代理接口

    Apr 5, 20235 min read

    地址

    https://github.com/billzhuang/azure-openai-proxy.git

    Install wrangler

    npm install -g wrangler
    
    wrangler login
    

    Install

    npm install && npm run build
    

    Local Development

    npm run build && npm run dev
    

    测试

    curl https://azure.your.com/v1/chat/completions \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer <key>" \
      -d '{
         "model": "gpt-3.5-turbo",
         "messages": [{"role": "user", "content": "Say this is a test!"}],
         "temperature": 0.7
       }'
    

    相关文章

    React 自定义 useLoading hooks

    该代码定义了一个React自定义钩子`useLoading`,用于管理组件加载、成功和失败状态。

    npm install时报unable to verify the first certificate 证书无效的错误

    npm安装时遇到“无法验证第一个证书”错误,可通过设置`npm config set strict-ssl false`来解决。

    使用webpack打包TS

    本文介绍了如何使用Webpack和相关插件(如ts-loader、html-webpack-plugin等)来打包TypeScript项目,并配置了开发和生产环境的打包命令。

    tun 模式代理本地流量

    Tun 模式是一种虚拟网络适配器,通过 VPN 隧道转发本地流量至远程服务器,绕过网络限制,使所有本地网络请求和响应通过此接口传输。

    Go 实现斐波那契数列

    斐波那契数列是一种每个数字都是前两个数字之和的递归数列,可通过循环或递归实现,如 `fibonacci(6)` 返回 8。