Skip to content

Commit 7484f26

Browse files
Merge pull request stanfordnlp#925 from BeatrixCohere/beatrix/CohereClientName
Add the cohere client name to Cohere calls
2 parents 2a97d20 + 16a5705 commit 7484f26

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dsp/modules/cohere.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(
5858
Additional arguments to pass to the API provider.
5959
"""
6060
super().__init__(model)
61-
self.co = cohere.Client(api_key)
61+
self.co = cohere.Client(api_key, client_name='dspy')
6262
self.provider = "cohere"
6363
self.kwargs = {
6464
"model": model,

dsp/modules/sentence_vectorizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def __init__(
128128
self.embedding_type = embedding_type
129129

130130
import cohere
131-
self.client = cohere.Client(api_key)
131+
self.client = cohere.Client(api_key, client_name='dspy')
132132

133133
def __call__(self, inp_examples: List["Example"]) -> np.ndarray:
134134
text_to_vectorize = self._extract_text_from_examples(inp_examples)

0 commit comments

Comments
 (0)