Skip to content

Commit

Permalink
Remove image from default
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed May 1, 2024
1 parent 051a061 commit d5c860a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions agixt/Interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ async def run(
agent_settings["image_provider"] != "None"
and agent_settings["image_provider"] != ""
and agent_settings["image_provider"] != None
and agent_settings["image_provider"] != "default"
):
img_gen_prompt = f"Users message: {user_input} \n\n{'The user uploaded an image, one does not need generated unless the user is specifically asking.' if images else ''} **The assistant is acting as sentiment analysis expert and only responds with a concise YES or NO answer on if the user would like an image as visual or a picture generated. No other explanation is needed!**\nWould the user potentially like an image generated based on their message?\nAssistant: "
logging.info(f"[IMG] Decision maker prompt: {img_gen_prompt}")
Expand Down
9 changes: 0 additions & 9 deletions agixt/providers/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,18 @@
# tts: gTTS
# transcription: faster-whisper
# translation: faster-whisper
# image: huggingface (Requires API Key)


class DefaultProvider:
def __init__(
self,
AI_MODEL: str = "mixtral-8x7b",
HUGGINGFACE_API_KEY: str = "",
**kwargs,
):
self.AI_MODEL = AI_MODEL if AI_MODEL else "mixtral-8x7b"
self.AI_TEMPERATURE = 0.7
self.AI_TOP_P = 0.7
self.MAX_TOKENS = 16000
self.HUGGINGFACE_API_KEY = HUGGINGFACE_API_KEY
self.TRANSCRIPTION_MODEL = (
"base"
if "TRANSCRIPTION_MODEL" not in kwargs
Expand All @@ -44,7 +41,6 @@ def services():
"tts",
"transcription",
"translation",
"image",
]

async def inference(self, prompt, tokens: int = 0, images: list = []):
Expand Down Expand Up @@ -85,8 +81,3 @@ async def translate_audio(self, audio_path: str):
audio_path=audio_path,
translate=True,
)

async def generate_image(self, prompt: str):
return await HuggingfaceProvider(
HUGGINGFACE_API_KEY=self.HUGGINGFACE_API_KEY
).generate_image(prompt=prompt)

0 comments on commit d5c860a

Please sign in to comment.