feat: 调整测试内容
This commit is contained in:
@@ -86,7 +86,7 @@ func (ch *GeminiChannel) ValidateKey(ctx context.Context, key string) (bool, err
|
|||||||
payload := gin.H{
|
payload := gin.H{
|
||||||
"contents": []gin.H{
|
"contents": []gin.H{
|
||||||
{"parts": []gin.H{
|
{"parts": []gin.H{
|
||||||
{"text": "Only output 'ok'"},
|
{"text": "hi"},
|
||||||
}},
|
}},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@@ -84,9 +84,9 @@ func (ch *OpenAIChannel) ValidateKey(ctx context.Context, key string) (bool, err
|
|||||||
payload := gin.H{
|
payload := gin.H{
|
||||||
"model": ch.TestModel,
|
"model": ch.TestModel,
|
||||||
"messages": []gin.H{
|
"messages": []gin.H{
|
||||||
{"role": "user", "content": "Only output 'ok'"},
|
{"role": "user", "content": "hi"},
|
||||||
},
|
},
|
||||||
"max_tokens": 1,
|
"max_tokens": 100,
|
||||||
}
|
}
|
||||||
body, err := json.Marshal(payload)
|
body, err := json.Marshal(payload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user