Skip to content

Commit

Permalink
fix get_embedding in class AzureSim, passing self.emb_call instead of… (
Browse files Browse the repository at this point in the history
#239)

* fix get_embedding in class AzureSim, passing self.emb_call instead of the client

* black reformatted sim.py
  • Loading branch information
hieutrtr authored Sep 27, 2024
1 parent f0fbff7 commit 6fcdd12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vision_agent/utils/sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def __init__(
raise ValueError("key is required if no column 'embs' is present.")

if sim_key is not None:
self.df["embs"] = self.df[sim_key].apply(lambda x: get_embedding(client, x))
self.df["embs"] = self.df[sim_key].apply(
lambda x: get_embedding(self.emb_call, x)
)


class OllamaSim(Sim):
Expand Down

0 comments on commit 6fcdd12

Please sign in to comment.