Skip to content

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

Closed
@evanyue-fish

Description

@evanyue-fish

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions