request_with_retries(
self,
,
method: Literal['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
| Name | Type | Description |
|---|---|---|
method* | Literal['GET', 'POST', 'PUT', 'PATCH', 'DELETE'] | The HTTP request method. |
pathname* | str | The pathname of the request URL. Will be appended to the API URL. |
request_kwargs | Optional[Mapping] | Default: None |
stop_after_attempt | int | Default: 1 |
retry_on | Optional[Sequence[type[BaseException]]] | Default: None |
to_ignore | Optional[Sequence[type[BaseException]]] | Default: None |
handle_response | Optional[Callable[[requests.Response, int], Any]] | Default: None |
_context | str | Default: '' |
**kwargs | Any | Default: {} |
Send a request with retries.
Additional request parameters.
The number of attempts to make.
The exceptions to retry on.
In addition to: [LangSmithConnectionError, LangSmithAPIError].
The exceptions to ignore / pass on.
A function to handle the response and return whether to continue retrying.
The context of the request.
Additional keyword arguments to pass to the request.