Skip to content

Commit

Permalink
Merge pull request #223 from haesleinhuepf/bugfix-no-vision-model-spe…
Browse files Browse the repository at this point in the history
…cified

Bugfix: initialisation crashed if no vision model is specified
  • Loading branch information
haesleinhuepf authored Jan 21, 2025
2 parents afe1488 + c85366e commit a096370
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bia_bob/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.25.0"
__version__ = "0.25.1"

__all__ = (
)
Expand Down
2 changes: 1 addition & 1 deletion src/bia_bob/_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def generate_response(chat_history, image, model, system_prompt, user_prompt, vi
base_url=Context.endpoint, api_key=Context.api_key,
vision_model=Context.vision_model,
vision_system_prompt=vision_system_prompt)
elif "mistral" in model or ("pixtral" in Context.vision_model and image is not None):
elif "mistral" in model or (Context.vision_model is not None and "pixtral" in Context.vision_model and image is not None):
full_response = generate_response_from_mistral(model, system_prompt, user_prompt, chat_history, image,
base_url=Context.endpoint, api_key=Context.api_key,
vision_model=Context.vision_model,
Expand Down

0 comments on commit a096370

Please sign in to comment.