stanfordnlp / dspy

DSPy: The framework for programming—not prompting—foundation models
https://dspy-docs.vercel.app/
MIT License
13.82k stars 1.06k forks source link

feature(dspy): dspy-integration-with-langfuse #1186

Open xucailiang opened 1 week ago

xucailiang commented 1 week ago

As mentioned in issue #1179 , I wrote some code to integrate langfuse. when configured correctly, It will support the display of data from OpenAI, AzureOpenAI and Ollama on the Langfuse dashboard

xucailiang commented 1 week ago

Hey @xucailiang I have left some comments. I am learning DSPy too and just wondering whether the proposed integration could be done in a more elegant way

I have rewritten the code, the new calling method is more elegant, I realize that all LLM reasoning can be collected to langfuse, but it is difficult for me to test all the code. I have already tested my submission, maybe we can continue to integrate other LLM modules after this PR is merged

denisergashbaev commented 3 days ago

@xucailiang hey! I will check it out this weekend

xucailiang commented 1 day ago

@xucailiang hey! I will check it out this weekend

Thanks for your time, I'm not sure if we'll wrap up this pull request over the weekend. If you have any suggestions or ideas to improve this, please feel free to share them with me at your earliest convenience. I'd really appreciate it!