adding prompt #4
-
Hello, How would I add the prompt to the api? Typically I see an example like this import os
import openai
openai.api_key = os.getenv("OPENAI_API_KEY")
response = openai.Completion.create(
model="text-davinci-003",
prompt="",
temperature=0.7,
max_tokens=256,
top_p=1,
frequency_penalty=0,
presence_penalty=0
) |
Beta Was this translation helpful? Give feedback.
Answered by
Zain-ul-din
Apr 3, 2023
Replies: 1 comment 8 replies
-
In typescript you cloud add prompt like: import { ChatGPTAPI } from 'chatgpt';
const client new ChatGPTAPI({ apiKey: this.apiKey });
client.sendMessage(prompt); ChatGPT API - package used in this project |
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
Zain-ul-din
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In typescript you cloud add prompt like:
usage in this project
ChatGPT API - package used in this project