mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-11-26 09:57:24 +03:00
Update types.py
This commit is contained in:
parent
0c4a1d0bfa
commit
b4399866ee
@ -1,5 +1,20 @@
|
||||
from ..providers.types import BaseProvider, ProviderType
|
||||
from ..providers.types import BaseProvider, ProviderType, FinishReason
|
||||
from typing import Union, Iterator
|
||||
|
||||
ImageProvider = Union[BaseProvider, object]
|
||||
Proxies = Union[dict, str]
|
||||
IterResponse = Iterator[Union[ChatCompletion, ChatCompletionChunk]]
|
||||
|
||||
class Client():
|
||||
def __init__(
|
||||
self,
|
||||
api_key: str = None,
|
||||
proxies: Proxies = None,
|
||||
provider: ProviderType = None,
|
||||
image_provider: ImageProvider = None,
|
||||
**kwargs
|
||||
) -> None:
|
||||
self.api_key: str = api_key
|
||||
self.proxies: Proxies = proxies
|
||||
self.chat: Chat = Chat(self, provider)
|
||||
self.images: Images = Images(self, image_provider)
|
||||
|
Loading…
Reference in New Issue
Block a user