Skip to content

[Bug] 为什么在InputField的prefix失效了 #7959

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

Open
evanyue-fish opened this issue Mar 14, 2025 · 1 comment
Open

[Bug] 为什么在InputField的prefix失效了 #7959

evanyue-fish opened this issue Mar 14, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@evanyue-fish
Copy link

What happened?

之前使用prefix,question = dspy.InputField(prefix='my_quetion')

执行后,实际上提示词还是使用question而不是my_quetion

Steps to reproduce

class tt(dspy.Signature):
"""回答问题"""
q = dspy.InputField(prefix='question')
a = dspy.OutputField()
i = dspy.Predict(tt)
pre = i(q='花的颜色有多少种')
pre

实际上还是q,而不是question

System message:

Your input fields are:

  1. q (str)

Your output fields are:

  1. a (str)

All interactions will be structured in the following way, with the appropriate values filled in.

[[ ## q ## ]]
{q}

DSPy version

2.6.10

@evanyue-fish evanyue-fish added the bug Something isn't working label Mar 14, 2025
@okhat
Copy link
Collaborator

okhat commented Mar 15, 2025

Yes, prefix is not used by the adapters since DSPy 2.5+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants