Prompting Chain of Thought thinking chain development practice

7.2 Actual development of Prompting Chain of Thought
Now let’s look at a specific application case of Prompting Chain of Thought. First, define a get_completion_from_messages function, use the GPT-3.5 model, and directly use the OpenAI API instead of the LangChain method.

1.	import os
2.	import openai
3.	import sys
4.	from dotenv import load_dotenv, find_dotenv
5.	_ = load_dotenv(find_dotenv())
6.	
7.

Guess you like

Origin blog.csdn.net/duan_zhihua/article/details/131579417
Recommended