forked from Archives/langchain
Add finish reason to Generation for usage downstream (#526)
Add `finish_reason` to `Generation` as well as extend `BaseOpenAI._generate` to include it in the output. This can be useful for usage in downstream tasks when we need to filter for only generations that finished because of `"stop"` for example. Maybe we should add this to `LLMChain` as well? For more details, see https://beta.openai.com/docs/guides/completion/best-practices Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>harrison/pinecone-try-except
parent
e64ed7b975
commit
ba0cbb4a41
Loading…
Reference in New Issue