Configure base URL for OpenAI API initialization

- Added default base URL "/v1" in NewMoapi method
- Supports flexible base URL configuration for OpenAI API client
- Complements previous work on API configuration and streaming improvements
This commit is contained in:
Max 2025-02-06 09:19:10 +08:00
parent 96f4b5e55a
commit 9c0ab4e0e1

View file

@ -133,6 +133,7 @@ func NewMoapi(model string) (*OpenAI, error) {
model: model,
host: url,
organization: organization,
baseURL: "/v1",
maxToken: 16384,
}, nil
}