mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-17 09:16:36 +08:00
15 lines
319 B
Go
15 lines
319 B
Go
package geminiv2
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/songquanpeng/one-api/relay/meta"
|
|
)
|
|
|
|
func GetRequestURL(meta *meta.Meta) (string, error) {
|
|
baseURL := strings.TrimSuffix(meta.BaseURL, "/")
|
|
requestPath := strings.TrimPrefix(meta.RequestURLPath, "/v1")
|
|
return fmt.Sprintf("%s%s", baseURL, requestPath), nil
|
|
}
|