You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gpt4free/g4f/client/types.py

21 lines
656 B
Python

6 months ago
from ..providers.types import BaseProvider, ProviderType, FinishReason
6 months ago
from typing import Union, Iterator
6 months ago
6 months ago
ImageProvider = Union[BaseProvider, object]
Proxies = Union[dict, str]
IterResponse = Iterator[Union[ChatCompletion, ChatCompletionChunk]]
6 months ago
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)