jlewi / foyle

Foyle is a copilot to help developers deploy and operate their applications.
https://foyle.io
Apache License 2.0
108 stars 9 forks source link

Error Learning From Examples: Can't compute embedding because of too much context #260

Closed jlewi closed 1 month ago

jlewi commented 1 month ago
2024-09-26T16:17:07.509-0700    ERROR   learn/learner.go:116    Error learning from example {"example": "01J8QKPQWDK51T850APHKCSC3S", "error": "Failed to compute embeddings for example 01J8QKPQWDK51T850APHKCSC3S: Failed to create embeddings: error, status code: 400, message: This model's maximum context length is 8192 tokens, however you requested 8913 tokens (8913 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.", "errorVerbose": "error, status code: 400, message: This model's maximum context length is 8192 tokens, however you requested 8913 tokens (8913 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.\nFailed to create embeddings\ngithub.com/jlewi/foyle/app/pkg/learn.(*Learner).computeEmbeddings\n\t/Users/jlewi/git_foyle/app/pkg/learn/learner.go:289\ngithub.com/jlewi/foyle/app/pkg/learn.(*Learner).Reconcile\n\t/Users/jlewi/git_foyle/app/pkg/learn/learner.go:200\ngithub.com/jlewi/foyle/app/pkg/learn.(*Learner).eventLoop.func1\n\t/Users/jlewi/git_foyle/app/pkg/learn/learner.go:115\ngithub.com/jlewi/foyle/app/pkg/learn.(*Learner).eventLoop\n\t/Users/jlewi/git_foyle/app/pkg/learn/learner.go:122\nruntime.goexit\n\t/opt/homebrew/Cellar/go/1.22.5/libexec/src/runtime/asm_arm64.s:1222\nFailed to compute embeddings for example 01J8QKPQWDK51T850APHKCSC3S\ngithub.com/jlewi/foyle/app/pkg/learn.(*Learner).Reconcile\n\t/Users/jlewi/git_foyle/app/pkg/learn/learner.go:201\ngithub.com/jlewi/foyle/app/pkg/learn.(*Learner).eventLoop.func1\n\t/Users/jlewi/git_foyle/app/pkg/learn/learner.go:115\ngithub.com/jlewi/foyle/app/pkg/learn.(*Learner).eventLoop\n\t/Users/jlewi/git_foyle/app/pkg/learn/learner.go:122\nruntime.goexit\n\t/opt/homebrew/Cellar/go/1.22.5/libexec/src/runtime/asm_arm64.s:1222"}