tmc / langchaingo

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

llms: GenerateFromSinglePrompt struct literal uses unkeyed fields #926

Open iocron opened 1 week ago

iocron commented 1 week ago

This is not a bug right now (rather a slight optimization), because llms/llms.go (func GenerateFromSinglePrompt) uses unkeyed fields (at llms.TextContent{prompt}), which could potentially lead to a bug in the future.

PR Checklist