Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
srdas committed Oct 24, 2024
1 parent eac2ef4 commit 54469d9
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions docs/source/developers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,19 +415,6 @@ def create_llm_chain(
self.prompt_template = prompt_template

runnable = prompt_template | llm # type:ignore
if not llm.manages_history:
runnable = RunnableWithMessageHistory(
runnable=runnable, # type:ignore[arg-type]
get_session_history=self.get_llm_chat_memory,
input_messages_key="extra_instructions",
history_messages_key="history",
history_factory_config=[
ConfigurableFieldSpec(
id="last_human_msg",
annotation=HumanChatMessage,
),
],
)
self.llm_chain = runnable
```

Expand Down Expand Up @@ -488,6 +475,9 @@ async def stream_reply(
- `config` (optional): A `RunnableConfig` object that specifies
additional configuration when streaming from the runnable.
- `pending_msg` (optional): Changes the default pending message from
"Generating response".
"""
assert self.llm_chain
assert isinstance(self.llm_chain, Runnable)
Expand Down

0 comments on commit 54469d9

Please sign in to comment.