Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymousUser committed Sep 21, 2024
1 parent a5a04a3 commit a6367e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gepetto/gepetto/models/local_ollama.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def supported_models():
if OLLAMA_MODELS is None:
try:
OLLAMA_MODELS = [m["name"] for m in create_client().list()["models"]]
except _httpx.ConnectError:
except (_httpx.ConnectError, ollama.ResponseError):
OLLAMA_MODELS = []
return OLLAMA_MODELS

Expand Down
6 changes: 2 additions & 4 deletions Gepetto/gepetto/models/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ def query_model_async(self, query, cb, additional_model_options=None):
:param additional_model_options: Additional parameters used when creating the model object. Typically, for
OpenAI, response_format={"type": "json_object"}.
"""
if additional_model_options is None:
additional_model_options = {}
t = threading.Thread(target=self.query_model, args=[query, cb, additional_model_options])
t.start()
t = threading.Thread(target=self.query_model, args=[query, cb, additional_model_options])
t.start()

gepetto.models.model_manager.register_model(GPT)

0 comments on commit a6367e2

Please sign in to comment.