stanfordnlp / dspy

DSPy: The framework for programming—not prompting—language models
https://dspy.ai
MIT License
19.07k stars 1.46k forks source link

dspy.configure lm error #1625

Closed bayazknn closed 3 weeks ago

bayazknn commented 1 month ago

when i call this method dspy.configure(lm=lm), i am taking below error. dspy version is 2.5.7 AttributeError This cell raised an exception: AttributeError('module 'dspy' has no attribute 'configure'')

See the console area for a traceback.

Traceback (most recent call last): File "C:\Users\bayaz\OneDrive\Masaüstü\morimo\morimo\Lib\site-packages\marimo_runtime\executor.py", line 171, in execute_cell return eval(cell.last_expr, glbls) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Cell marimo://C:\Users\bayaz\OneDrive\Masaüstü\morimo\gemini_agents.py#cell=cell-9, line 1, in dspy.configure(lm=lm) ^^^^^^^^^^^^^^ AttributeError: module 'dspy' has no attribute 'configure'

arnavsinghvi11 commented 1 month ago

Hi @bayazknn , you should do dspy.settings.configure(lm = lm)

can you try upgrading to dspy-ai==2.5.8 and importing dspy before running your code and seeing if this works? dspy.configure should work post 2.5 migration mb

okhat commented 1 month ago

@bayazknn we updated the response, please see above, let us know if not!