qapipeline.WithPrompt returns a new QAPipeline instance
jcalonso opened this issue · 3 comments
jcalonso commented
Describe the bug
When using qapipeline.WithPrompt, it returns a new QAPipeline instead of modifying the current one, later when calling Run or Query it throws a nil pointer exception because the LLMEngine is nil.
To Reproduce
res, err := qapipeline.
New(openaiClient).
WithPrompt(chatConv).
WithIndex(a.index).
Query(context.Background(), query, option.WithTopK(1))
Expected behavior
The WithPrompt method should modify the current instance and return that one.
Lingoose version: 0.0.12
henomis commented
This depends on missing qa pipeline initialization on WithPrompt
method. Could you please use v0.0.13-alpha.1 and check?