I think this plugin is breaking docstring parsing. The following code will produce an error that it shouldn't:
import lmql
@lmql.query
def chain_of_thought(question):
'''lmql
# Q&A prompt template
"Q: {question}\n"
"A: Let's think step by step.\n"
"[REASONING]"
"Thus, the answer is:[ANSWER]."
# return just the ANSWER to the caller
return ANSWER
'''
print(chain_of_thought('Today is the 12th of June, what day was it 1 week ago?'))
produces:
File "/home/user/.pyenv/versions/3.11.6/lib/python3.11/inspect.py", line 1081, in findsource
raise OSError('could not get source code')
OSError: could not get source code
Failed to parse docstring of query function as LMQL code:
I think this plugin is breaking docstring parsing. The following code will produce an error that it shouldn't:
produces: