* move request_builder into internal pkg (#304) * add some test for internal.RequestBuilder * add a test for openai.GetEngine
This commit is contained in:
committed by
GitHub
parent
62eb4beed2
commit
61ba5f3369
@@ -22,7 +22,7 @@ type EnginesList struct {
|
||||
// ListEngines Lists the currently available engines, and provides basic
|
||||
// information about each option such as the owner and availability.
|
||||
func (c *Client) ListEngines(ctx context.Context) (engines EnginesList, err error) {
|
||||
req, err := c.requestBuilder.build(ctx, http.MethodGet, c.fullURL("/engines"), nil)
|
||||
req, err := c.requestBuilder.Build(ctx, http.MethodGet, c.fullURL("/engines"), nil)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -38,7 +38,7 @@ func (c *Client) GetEngine(
|
||||
engineID string,
|
||||
) (engine Engine, err error) {
|
||||
urlSuffix := fmt.Sprintf("/engines/%s", engineID)
|
||||
req, err := c.requestBuilder.build(ctx, http.MethodGet, c.fullURL(urlSuffix), nil)
|
||||
req, err := c.requestBuilder.Build(ctx, http.MethodGet, c.fullURL(urlSuffix), nil)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user