Giter Club home page Giter Club logo

Comments (5)

draenix avatar draenix commented on June 16, 2024

Azure OpenAI API 调用是可以走通的,好奇是否不支持REST API的形式
image

from one-api.

softgoto avatar softgoto commented on June 16, 2024

http://localhost:3000/ 如果不带上v1默认是进入管理后台的,但Azure OpenAI的接口是不带v1的,感觉是路由层的规则限制了,因为不懂go语言,同样被这个问题困扰中

from one-api.

softgoto avatar softgoto commented on June 16, 2024

@draenix 把issue翻了几遍,找到了作者的一段回复内容,作者说“另外 One API 是把 Azure 的格式转换为 OpenAI 的格式,而不是反过来。”。原文在这里:#127

我的理解是,我们在One API中配置的渠道不管是OpenAI还是Azure OpenAI还是开源模型,对调用者来说,他都应该按OpenAI的格式来使用。

我做了测试,渠道中配置了Azure OpenAI模型,使用langchain框架和postman的http请求调用,都成功了。

from one-api.

draenix avatar draenix commented on June 16, 2024

嗯,我也尝试了Azure的 OpenAI API 调用是可以走通的。集合接口的restful API应该是目前还没兼容支持的。正如作者和老哥你的理解,设计的初衷都是为了支持OpenAPI格式的不同模型。所以,开源了一套小众对外部用户提供类似chatgpt窗口的收费服务,
没有考虑团队内部的特殊使用场景,源码里存在有两个限制:不支持api多样性+token写死了有效期一个月

from one-api.

songquanpeng avatar songquanpeng commented on June 16, 2024

之后的重构计划会考虑到这一点的,感谢关注,重构需要时间希望理解

from one-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.