Comments (10)
测试无法复现
from new-api.
测试无法复现
嗯,它會產生這樣的bug前提是你的渠道,當中要有人去提供這樣的一個模型
打個比方說你有一個渠道,有提供 claude 的模型,然後另外一個提供 gpt 的模型
然後你有一個令牌限制,只能用 gpt 的模型
這個時候,如果你用 models 去抓的話,會抓到兩個模型
可能再麻煩你試試看了
from new-api.
我的渠道肯定是有claude-3-5-sonnet-20240620这个模型的
from new-api.
我的渠道肯定是有claude-3-5-sonnet-20240620这个模型的
那我下午的時候用你的方法測試一下
目前猜測是open webui 連false的模型也會抓 🤔
from new-api.
嗯,這個 bug 要產生是請求頭 models 才會發生
使用到的測試代碼如下 記得填入你自己的呃認證的 key
可能需要的認證token
headers["Authorization"] = ""
from tabulate import tabulate
# 設置API的基礎URL
base_url = "http://localhost:9090/v1"
# 設置headers
headers = {
"Content-Type": "application/json"
}
# 可能需要的認證token
headers["Authorization"] = ""
def get_models():
try:
response = requests.get(f"{base_url}/models", headers=headers)
response.raise_for_status() # 如果請求不成功則拋出異常
return response.json()
except requests.RequestException as e:
print(f"發生錯誤: {e}")
return None
# 執行請求並處理結果
models = get_models()
if models and 'data' in models:
# 提取所有模型的id
model_ids = [model['id'] for model in models['data']]
# 使用tabulate創建一個漂亮的表格
table = tabulate([[id] for id in model_ids], headers=['Model ID'], tablefmt='fancy_grid')
print("可用的模型:")
print(table)
else:
print("無法獲取模型列表或列表為空。")```
以下截取一部分的返回結果
裏面可以清楚的看到有一些我沒有允許通過的模型
![image](https://github.com/user-attachments/assets/a2f50e93-acfb-470a-a165-d99b4ee69065)
![image](https://github.com/user-attachments/assets/20b32b0b-fea2-4098-a83d-db3d07ff4c55)
我有且僅有這一個 api key
from new-api.
from new-api.
模型列表获取和能否请求是两码事,而且OpenWebUI本身支持白名单模型
from new-api.
模型列表获取和能否请求是两码事,而且OpenWebUI本身支持白名单模型
多謝回覆 看來是我描述錯誤issues 那想問一下 new api之後可能會支持把models接口所展示出來的模型列表也一併限制嗎
from new-api.
模型列表获取和能否请求是两码事,而且OpenWebUI本身支持白名单模型
多謝回覆 看來是我描述錯誤issues 那想問一下 new api之後可能會支持把models接口所展示出來的模型列表也一併限制嗎
你应该重新开一个issue描述这个问题
from new-api.
好
from new-api.
Related Issues (20)
- vertex 部署的claude调用报错
- command-r-plus-08-2024无法自定义补全倍率
- Claude 渠道,没有对 Tool 的 role 进行处理 HOT 1
- 智谱AI HOT 1
- 能不能把聊天里的lobechat关了, 有广告
- 不同渠道的同名模型在被重定向后,存在混合调用的问题
- 不支持OpenAI的structure output 模式 HOT 1
- gpt-4o-mini模型的token计算和官方出入较大 HOT 5
- 不会自动禁用 HOT 5
- Huggingface Endpoint Integration Request. HOT 4
- 请求延迟高问题 HOT 2
- alpha版本能不能不设置latest啊
- 新增stripe支付功能 HOT 8
- 渠道ID不正常增加 HOT 5
- 请问是否有计划支持runway、luma等视频接口
- 希望添加gemini的新模型gemini-1.5-pro-exp-0827 HOT 2
- 渠道管理,希望增加:只显示启用渠道开关
- new api 支持把 models 接口所展示出來的模型列表也一併限制
- 优化一下失败重试逻辑
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 new-api.