-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
FeatureNew featureNew featureRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)
Description
Some model queries can take a long time, it would be nice to be able to manage the HttpClient options one way or the other : either by passing down a custom HttpClient instance, or to allow options to be passed from the agent call directly.
final readonly class ModelClient implements ModelClientInterface
{
....
public function request(Model $model, array|string $payload, array $options = []): ResponseInterface
{
return $this->httpClient->request('POST', 'https://api.mistral.ai/v1/chat/completions', [
'auth_bearer' => $this->apiKey,
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => array_merge($options, $payload),
'timeout' => 600,
'max_duration' => 600,
]);
}
}
Metadata
Metadata
Assignees
Labels
FeatureNew featureNew featureRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)