Skip to content

Commit d27c5af

Browse files
Use language in system instructions for dspy.Code fields (#9106)
* Use language in system instructions * Use lowercase
1 parent b6115d4 commit d27c5af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dspy/adapters/types/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def serialize_model(self):
7979
def description(cls) -> str:
8080
return (
8181
"Code represented in a string, specified in the `code` field. If this is an output field, the code "
82-
"field should follow the markdown code block format, e.g. \n```python\n{code}\n``` or \n```cpp\n{code}\n```"
82+
f"field should follow the markdown code block format, e.g. \n```{cls.language.lower()}\n{{code}}\n```"
8383
f"\nProgramming language: {cls.language}"
8484
)
8585

0 commit comments

Comments
 (0)