Comments (5)
也许可以采取更通用的方式,支持使用渠道特定的URL来覆盖requestURL,这样可以同时解决 #1472 的问题。
from one-api.
有v1才是标准接口,不因该去迁就非标准吧
from one-api.
我并不是想要抛弃目前的v1标准接口,而是同时兼容其他不带有v1路径的接口。有很多外部模型不是openai标准一模一样的接口,比如本项目目前已适配的AzureOpenAI、Minimax、CloudFlare等等。
具体的实现方式,比如可以在“自定义渠道”里加个选项,在此GetFullRequestURL函数中判断一下是否删除v1前缀即可。
one-api/relay/adaptor/openai/helper.go
Lines 18 to 30 in 9321427
from one-api.
个人感觉自定义渠道那个地方应该改成自定义完整的请求路径,但是这个做法没有一个完善的方案,因为不兼容openai路径的请求模型,我相信也不兼容openai的请求格式
from one-api.
I hope this gets added too, there's more and more websites now that have OpenAI formatting but uses something like /api/chat/completions or /something/chat/completions.
from one-api.
Related Issues (20)
- OneAPI English - Global Version
- Unreasonable cogview-3 prompt length limit
- Ollama填写地址成功调用后,但是仍出现404现象 HOT 1
- 是不是目前只能支持langchain的chat模式,llm模型不支持呢
- 建议增加更多运营功能
- 请求接入dify知识库 HOT 5
- 希望增加新的知识库 MaxKB
- docker.io 不能访问 HOT 3
- [开源合作] 请求添加VChart引用 HOT 3
- 对接本地模型的openai接口,stream模式下没有返回 HOT 4
- 关于将本项目转成组织项目的想法 HOT 17
- 关于项目镜像完善建议
- 调用讯飞星火Spark Pro/Max Function Call 不能按预期返回 Function Call 形式的结果,只会返回普通对话形式的结果
- 隔离网环境oneapi代理功能无法使用
- gpt-4o计价存在问题 HOT 8
- docker版启动后,可能得等一阵子才能用api
- 对于报错传递给上游的转发客户端“xx无可用渠道”应该进行禁用 HOT 1
- minimax模型不能正确记录log HOT 2
- cloudflare Workers AI 文本生成图像模型支持 HOT 2
- LM Studio API, Open Web UI API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from one-api.