mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-18 09:36:37 +08:00
feat: Migrate to Anthropic Message API
- Migrate to Anthropic Message API
This commit is contained in:
parent
75d2055e03
commit
f9df8eaa63
@ -20,7 +20,9 @@ func (a *Adaptor) Init(meta *util.RelayMeta) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *Adaptor) GetRequestURL(meta *util.RelayMeta) (string, error) {
|
func (a *Adaptor) GetRequestURL(meta *util.RelayMeta) (string, error) {
|
||||||
return fmt.Sprintf("%s/v1/complete", meta.BaseURL), nil
|
// https://docs.anthropic.com/claude/reference/messages_post
|
||||||
|
// anthopic migrate to Message API
|
||||||
|
return fmt.Sprintf("%s/v1/messages", meta.BaseURL), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Request, meta *util.RelayMeta) error {
|
func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Request, meta *util.RelayMeta) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user