API 명세 (python)
langchain API Reference — 🦜🔗 LangChain 0.0.338
langchain.js
https://python.langchain.com/docs/expression_language/interface#output-schema
Component | Input Type | Output Type |
---|---|---|
Prompt | Dictionary | PromptValue |
ChatModel | Single string, list of chat messages or a PromptValue | ChatMessage |
LLM | Single string, list of chat messages or a PromptValue | String |
OutputParser | The output of an LLM or ChatModel | Depends on the parser |
Retriever | Single string | List of Documents |
Tool | Single string or dictionary, depending on the tool | Depends on the tool |
langChain Expression Language
|
연산자로 연결한다던지 하는 그런 표현식결과를 한번에 주지 않고 실시간으로 출력해주는 기능
...
from langchain.callbacks import StreamingStdOutCallbackHandler
chat = ChatOpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()])
...