We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 012b541 commit 5f10c9bCopy full SHA for 5f10c9b
src/Image.php
@@ -42,9 +42,12 @@ public function generations(array $data, array $options)
42
}
43
];
44
$model = $data['model'] ?? '';
45
- $path = $this->isAzure ? "/openai/deployments/$model/images/generations?api-version=$this->azureApiVersion" : "/v1/images/generations";
46
- $http = new Client(['timeout' => 300]);
47
- $http->request($this->api . $path, $requestOptions);
+ $url = $this->api;
+ if (!parse_url($this->api, PHP_URL_PATH)) {
+ $url = $this->api . ($this->isAzure ? "/openai/deployments/$model/images/generations?api-version=$this->azureApiVersion" : "/v1/images/generations");
48
+ }
49
+ $http = new Client(['timeout' => 600]);
50
+ $http->request($url, $requestOptions);
51
52
53
/**
0 commit comments