DSPy: The framework for programming—not prompting—language models
Python
(feature) Adding support for Mistral AI's API
Franck Stephane Ndzomga226077436fa3
diff --git a/dsp/modules/__init__.py b/dsp/modules/__init__.pyindex eceabc3c4..737c7c795 100644--- a/dsp/modules/__init__.py+++ b/dsp/modules/__init__.py@@ -9,8 +9,8 @@ from .google import *from .gpt3 import *from .hf import HFModelfrom .hf_client import Anyscale, HFClientTGI, Together+from .mistral import *from .ollama import *from .pyserini import *from .sbert import *from .sentence_vectorizer import *-from .mistral import *diff --git a/dsp/modules/lm.py b/dsp/modules/lm.pyindex b2500d290..e382d4c50 100644--- a/dsp/modules/lm.py+++ b/dsp/modules/lm.py@@ -53,20 +53,13 @@ class LM(ABC):x['response'],),)- elif provider == "mistral":+ elif provider == "mistral" or provider == "mistral":printed.append((prompt,x['response'].choices,),)- elif provider == "mistral":- printed.append(- (- prompt,- x['response'].choices- )- )else:printed.append((