mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
refactor(huggingface,-anthropic,-replicate,-sagemaker): making huggingface, anthropic, replicate, sagemaker compatible openai v1 sdk
This commit is contained in:
parent
547598a134
commit
4f42beb9d9
4 changed files with 11 additions and 2 deletions
|
@ -5,11 +5,14 @@ import time
|
|||
from typing import Callable, Optional
|
||||
from litellm.utils import ModelResponse
|
||||
import litellm
|
||||
import httpx
|
||||
|
||||
class ReplicateError(Exception):
|
||||
def __init__(self, status_code, message):
|
||||
self.status_code = status_code
|
||||
self.message = message
|
||||
self.request = httpx.Request(method="POST", url="https://api.replicate.com/v1/deployments")
|
||||
self.response = httpx.Response(status_code=status_code, request=self.request)
|
||||
super().__init__(
|
||||
self.message
|
||||
) # Call the base class constructor with the parameters it needs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue