You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the fundamental difference between ChatOpenAI("gpt-3.5-turbo") and OpenAI("gpt-3.5-turbo")?
What are the differences in interaction with the OpenAI API?
Which one is more recommended to use in ConversationalRetrievalQAChain?
I am confused about the selection and use of these two models.
I want to custom prompts for ConversationalRetrievalQAChain and summarization chain, but the prompt formats used by these two models seem to be different.
Example prompt selector in the project :
constqa_template=`Use the following portion of a long document to see if any of the text is relevant to answer the question. Return any relevant text verbatim.{context}Question: {question}Relevant text, if any:`;exportconstDEFAULT_COMBINE_QA_PROMPT=/*#__PURE__*/PromptTemplate.fromTemplate(qa_template);constsystem_template=`Use the following portion of a long document to see if any of the text is relevant to answer the question. Return any relevant text verbatim.----------------{context}`;constmessages=[/*#__PURE__*/SystemMessagePromptTemplate.fromTemplate(system_template),/*#__PURE__*/HumanMessagePromptTemplate.fromTemplate("{question}"),];constCHAT_QA_PROMPT=/*#__PURE__*/ChatPromptTemplate.fromPromptMessages(messages);exportconstCOMBINE_QA_PROMPT_SELECTOR=/*#__PURE__*/newConditionalPromptSelector(DEFAULT_COMBINE_QA_PROMPT,[[isChatModel,CHAT_QA_PROMPT],]);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What is the fundamental difference between ChatOpenAI("gpt-3.5-turbo") and OpenAI("gpt-3.5-turbo")?
What are the differences in interaction with the OpenAI API?
Which one is more recommended to use in ConversationalRetrievalQAChain?
I am confused about the selection and use of these two models.
I want to custom prompts for ConversationalRetrievalQAChain and summarization chain, but the prompt formats used by these two models seem to be different.
Example prompt selector in the project :
Beta Was this translation helpful? Give feedback.
All reactions