Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
eladven committed Feb 18, 2025
1 parent 5af6401 commit 73a29fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/unitxt/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,14 +1156,14 @@ def _infer(
import ollama

args = self.to_dict([StandardAPIParamsMixin])
filtered_args = {k: v for k, v in args.items() if v}
results = []

model = args.pop("model")
for instance in dataset:
messages = self.to_messages(instance)
response = ollama.chat(
messages=messages,
**filtered_args,
model=model,
options=args,
)
results.append(response)

Expand Down

0 comments on commit 73a29fb

Please sign in to comment.