Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fastchat/serve/api_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ def reka_api_stream_iter(
for chunk in response:
try:
yield {"text": chunk.responses[0].chunk.content, "error_code": 0}
except:
except Exception:
yield {
"text": f"**API REQUEST ERROR** ",
"error_code": 1,
Expand Down
2 changes: 1 addition & 1 deletion fastchat/serve/monitor/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ def get_model_name(model_key):
"Model"
].values[0]
return model_name
except:
except Exception:
return None

combined_table = []
Expand Down
2 changes: 1 addition & 1 deletion fastchat/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def image_moderation_request(image_bytes, endpoint, api_key):
try:
if response["Status"]["Code"] == 3000:
break
except:
except Exception:
time.sleep(0.5)
return response

Expand Down
2 changes: 1 addition & 1 deletion playground/test_embedding/test_semantic_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def cosine_similarity(vec1, vec2):
try:
return 1 - cosine(vec1, vec2)
except:
except Exception:
print(vec1.shape, vec2.shape)


Expand Down