You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retry interval will grow by a factor specified in `retry_interval_factor`.
49
+
50
+
If any of the other retry related fields is specified, the default for this field is 50 milliseconds, otherwise restate will fallback to the overall invocation retry policy."""
51
+
max_retry_interval: Optional[timedelta] =None
52
+
"""Max interval between retries.
53
+
Retry interval will grow by a factor specified in `retry_interval_factor`.
54
+
55
+
The default is 10 seconds."""
56
+
retry_interval_factor: Optional[float] =None
57
+
"""Exponentiation factor to use when computing the next retry delay.
58
+
59
+
If any of the other retry related fields is specified, the default for this field is `2`, meaning retry interval will double at each attempt, otherwise restate will fallback to the overall invocation retry policy."""
60
+
61
+
62
+
# The OpenAI ModelResponse class is a dataclass with Pydantic fields.
63
+
# The Restate SDK cannot serialize this. So we turn the ModelResponse int a Pydantic model.
64
+
classRestateModelResponse(BaseModel):
65
+
output: list[TResponseOutputItem]
66
+
"""A list of outputs (messages, tool calls, etc) generated by the model"""
67
+
68
+
usage: Usage
69
+
"""The usage information for the response."""
70
+
71
+
response_id: str|None
72
+
"""An ID for the response which can be used to refer to the response in subsequent calls to the
73
+
model. Not supported by all model providers.
74
+
If using OpenAI models via the Responses API, this is the `response_id` parameter, and it can
0 commit comments