henomis/lingoose

qapipeline.WithPrompt returns a new QAPipeline instance

jcalonso opened this issue · 3 comments

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

This depends on missing qa pipeline initialization on WithPrompt method. Could you please use v0.0.13-alpha.1 and check?

@jcalonso is there any news?

Thanks, @henomis, it's working now! 👌
Appreciate it! 😃