mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-20 13:54:48 +00:00
update metaphor docs (#8886)
This commit is contained in:
parent
33cdb06b5c
commit
bbd22b9b76
File diff suppressed because one or more lines are too long
@ -44,6 +44,7 @@ This allows for a few different ways to customize, including passing in a custom
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
from langchain.schema import SystemMessage
|
from langchain.schema import SystemMessage
|
||||||
|
from langchain.agents import OpenAIFunctionsAgent
|
||||||
system_message = SystemMessage(content="You are very powerful assistant, but bad at calculating lengths of words.")
|
system_message = SystemMessage(content="You are very powerful assistant, but bad at calculating lengths of words.")
|
||||||
prompt = OpenAIFunctionsAgent.create_prompt(system_message=system_message)
|
prompt = OpenAIFunctionsAgent.create_prompt(system_message=system_message)
|
||||||
```
|
```
|
||||||
@ -51,7 +52,6 @@ prompt = OpenAIFunctionsAgent.create_prompt(system_message=system_message)
|
|||||||
Putting those pieces together, we can now create the agent.
|
Putting those pieces together, we can now create the agent.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from langchain.agents import OpenAIFunctionsAgent
|
|
||||||
agent = OpenAIFunctionsAgent(llm=llm, tools=tools, prompt=prompt)
|
agent = OpenAIFunctionsAgent(llm=llm, tools=tools, prompt=prompt)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user