livekit-plugins-anthropic 0.2.8__py3-none-any.whl → 0.2.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -206,6 +206,7 @@ class LLMStream(llm.LLMStream):
206
206
  self._output_tokens = 0
207
207
 
208
208
  async def _run(self) -> None:
209
+ retryable = True
209
210
  try:
210
211
  if not self._anthropic_stream:
211
212
  self._anthropic_stream = await self._awaitable_anthropic_stream
@@ -215,6 +216,7 @@ class LLMStream(llm.LLMStream):
215
216
  chat_chunk = self._parse_event(event)
216
217
  if chat_chunk is not None:
217
218
  self._event_ch.send_nowait(chat_chunk)
219
+ retryable = False
218
220
 
219
221
  self._event_ch.send_nowait(
220
222
  llm.ChatChunk(
@@ -227,7 +229,7 @@ class LLMStream(llm.LLMStream):
227
229
  )
228
230
  )
229
231
  except anthropic.APITimeoutError:
230
- raise APITimeoutError()
232
+ raise APITimeoutError(retryable=retryable)
231
233
  except anthropic.APIStatusError as e:
232
234
  raise APIStatusError(
233
235
  e.message,
@@ -236,7 +238,7 @@ class LLMStream(llm.LLMStream):
236
238
  body=e.body,
237
239
  )
238
240
  except Exception as e:
239
- raise APIConnectionError() from e
241
+ raise APIConnectionError(retryable=retryable) from e
240
242
 
241
243
  def _parse_event(
242
244
  self, event: anthropic.types.RawMessageStreamEvent
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "0.2.8"
15
+ __version__ = "0.2.9"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: livekit-plugins-anthropic
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: Agent Framework plugin for services from Anthropic
5
5
  Home-page: https://github.com/livekit/agents
6
6
  License: Apache-2.0
@@ -0,0 +1,10 @@
1
+ livekit/plugins/anthropic/__init__.py,sha256=1WCyNEaR6qBsX54qJQM0SeY-QHIucww16PLXcSnMqRo,1175
2
+ livekit/plugins/anthropic/llm.py,sha256=bl3cLKLvz_hTf_fL9PfDLMl6uPvFkRJTn_R33T39ZQw,19080
3
+ livekit/plugins/anthropic/log.py,sha256=fG1pYSY88AnT738gZrmzF9FO4l4BdGENj3VKHMQB3Yo,72
4
+ livekit/plugins/anthropic/models.py,sha256=wyTr2nl6SL4ylN6s4mHJcqtmgV2mjJysZo89FknWdhI,213
5
+ livekit/plugins/anthropic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ livekit/plugins/anthropic/version.py,sha256=H-ib9_H1SbJY8B6-psDc7ndkyQeTmdfDstZPRVGab34,600
7
+ livekit_plugins_anthropic-0.2.9.dist-info/METADATA,sha256=7g5vPjgRL8_Nlv1jBKE7SeK9kFrPv4SGWtA8INpvMjk,1265
8
+ livekit_plugins_anthropic-0.2.9.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
9
+ livekit_plugins_anthropic-0.2.9.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
10
+ livekit_plugins_anthropic-0.2.9.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- livekit/plugins/anthropic/__init__.py,sha256=1WCyNEaR6qBsX54qJQM0SeY-QHIucww16PLXcSnMqRo,1175
2
- livekit/plugins/anthropic/llm.py,sha256=e65Z_YchNHCXN2F1kKb8lczfSY1_Ak8Y_94nT12pZGI,18975
3
- livekit/plugins/anthropic/log.py,sha256=fG1pYSY88AnT738gZrmzF9FO4l4BdGENj3VKHMQB3Yo,72
4
- livekit/plugins/anthropic/models.py,sha256=wyTr2nl6SL4ylN6s4mHJcqtmgV2mjJysZo89FknWdhI,213
5
- livekit/plugins/anthropic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- livekit/plugins/anthropic/version.py,sha256=711Prlpzg5p2xCBjcE2dctFtzW_seKcOBI5-dvNUVK4,600
7
- livekit_plugins_anthropic-0.2.8.dist-info/METADATA,sha256=xG06Y2Xf9RjmmBqJ314_6ZmFlEM0ZCo00K82wJHEHHo,1265
8
- livekit_plugins_anthropic-0.2.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
9
- livekit_plugins_anthropic-0.2.8.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
10
- livekit_plugins_anthropic-0.2.8.dist-info/RECORD,,