Understanding ChatGpt Prompt Engineering- Part V - Using ChatGPT for Transforming text
Basic Usage of LLM’s #loading the boiler plate code import openai import os from dotenv import load_dotenv, find_dotenv #library to load the local environment variables jupyter _=load_dotenv(find_dotenv()) api_key= os.getenv("OPENAI_API_KEY") #creating the basic prompting function client = openai.OpenAI() def get_completion(prompt, model = "gpt-3.5-turbo"): messages = [{"role": "user", "content":prompt}] response = client.chat.completions.create( model = model, messages = messages, temperature = 0 ) return response.choices[0].message.content LLM as a Transforming device Consider the below text in Sanskrit....