go-openai
go-openai copied to clipboard
Use setters pattern for `fullURL` method
Currently client's fullURL method expects optional first argument to be an Azure model name:
// fullURL returns full URL for request.
// args[0] is model name, if API type is Azure, model name is required to get deployment name.
func (c *Client) fullURL(suffix string, args ...any) string {
Let's make this more straighforward by using setters pattern similar to newRequest method:
func (c *Client) newRequest(ctx context.Context, method, url string, setters ...requestOption) (*http.Request, error) {