Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/support-lm-reasoning-field #7794

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xucailiang
Copy link
Contributor

@xucailiang xucailiang commented Feb 9, 2025

‘ reasoning_field’ is a custom field, so it can be adapted to any LLM with a reasoning process, or it can be completely ignored if needed.

The test script is as follows:

import dspy

lm = dspy.LM('deepseek/deepseek-reasoner', api_key='sk-xxx', reasoning_field='reasoning_content')
dspy.configure(lm=lm)

if __name__ == '__main__':
    react = dspy.ChainOfThought("question -> answer")
    pred = react(question="Who is Apple's CEO?")
    
    lm.inspect_history()
    print("answer", pred.answer)

@isaacbmiller
Copy link
Collaborator

thanks for the contribution - i haven't seen this field before.

which provider(s) are including this instead of the tags

@xucailiang
Copy link
Contributor Author

thanks for the contribution - i haven't seen this field before.

which provider(s) are including this instead of the tags

This field originates from Deepseek, and you can access the same field parameter when using LiteLLM. I have some questions about this issues

It's clearly a model-specific parameter that not all providers support. I'd like to hear your thoughts on this matter. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants