summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/DeepInfra.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-05-05 23:38:31 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-05-05 23:38:31 +0200
commit8fcf618bbe164e6c6f3e0df5e6c9809f35a50e6c (patch)
treed956ccf9116d4f4db0157c5025dcfbb2a4804487 /g4f/Provider/DeepInfra.py
parentAdd AppConfig class, update readme (diff)
downloadgpt4free-8fcf618bbe164e6c6f3e0df5e6c9809f35a50e6c.tar
gpt4free-8fcf618bbe164e6c6f3e0df5e6c9809f35a50e6c.tar.gz
gpt4free-8fcf618bbe164e6c6f3e0df5e6c9809f35a50e6c.tar.bz2
gpt4free-8fcf618bbe164e6c6f3e0df5e6c9809f35a50e6c.tar.lz
gpt4free-8fcf618bbe164e6c6f3e0df5e6c9809f35a50e6c.tar.xz
gpt4free-8fcf618bbe164e6c6f3e0df5e6c9809f35a50e6c.tar.zst
gpt4free-8fcf618bbe164e6c6f3e0df5e6c9809f35a50e6c.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/DeepInfra.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/g4f/Provider/DeepInfra.py b/g4f/Provider/DeepInfra.py
index a74601e8..9691539e 100644
--- a/g4f/Provider/DeepInfra.py
+++ b/g4f/Provider/DeepInfra.py
@@ -1,8 +1,7 @@
from __future__ import annotations
import requests
-from ..typing import AsyncResult, Messages, ImageType
-from ..image import to_data_uri
+from ..typing import AsyncResult, Messages
from .needs_auth.Openai import Openai
class DeepInfra(Openai):
@@ -33,7 +32,6 @@ class DeepInfra(Openai):
model: str,
messages: Messages,
stream: bool,
- image: ImageType = None,
api_base: str = "https://api.deepinfra.com/v1/openai",
temperature: float = 0.7,
max_tokens: int = 1028,
@@ -54,19 +52,6 @@ class DeepInfra(Openai):
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"macOS"',
}
- if image is not None:
- if not model:
- model = cls.default_vision_model
- messages[-1]["content"] = [
- {
- "type": "image_url",
- "image_url": {"url": to_data_uri(image)}
- },
- {
- "type": "text",
- "text": messages[-1]["content"]
- }
- ]
return super().create_async_generator(
model, messages,
stream=stream,