Spaces:
Running
Running
File size: 575 Bytes
db70da0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from langchain.prompts import ChatPromptTemplate, HumanMessagePromptTemplate, SystemMessagePromptTemplate,MessagesPlaceholder
from langchain import hub
def retriever_prompt():
return ChatPromptTemplate.from_messages([
SystemMessagePromptTemplate.from_template(
"Use the context to answer the question:\nContext: {context}"
"these are the titles of manuals you have:\nManuals: {docs}"
),
HumanMessagePromptTemplate.from_template("{query}"),
])
def agent_prompt():
prompt = hub.pull("hwchase17/openai-functions-agent")
return prompt
|