Skip to content

Commit 866840d

Browse files
authored
Update lm.py
Added ibm as provider for Watsonx
1 parent 96690de commit 866840d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dsp/modules/lm.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def inspect_history(self, n: int = 1, skip: int = 0):
5555
printed.append((prompt, x["response"].text))
5656
elif provider == "mistral":
5757
printed.append((prompt, x['response'].choices))
58+
elif provider == "ibm":
59+
printed.append((prompt, x))
5860
else:
5961
printed.append((prompt, x["response"]["choices"]))
6062

@@ -84,6 +86,8 @@ def inspect_history(self, n: int = 1, skip: int = 0):
8486
text = choices[0].parts[0].text
8587
elif provider == "mistral":
8688
text = choices[0].message.content
89+
elif provider == "ibm":
90+
text = choices
8791
else:
8892
text = choices[0]["text"]
8993
printing_value += self.print_green(text, end="")

0 commit comments

Comments
 (0)