tmc / langchaingo

LangChain for Go, the easiest way to write LLM-based programs in Go
https://tmc.github.io/langchaingo/
MIT License
4.38k stars 597 forks source link

Can I customize the streamingfunc function? #855

Open KimSeongIl opened 4 months ago

KimSeongIl commented 4 months ago
StreamingFunc func(ctx context.Context, chunk []byte) error

Like the code above, only chunk values ​​can be used in the streaming func function.

I would like to receive the llm call response result and process it by custom parsing it.

Is there any way to fix this?