# You are a text generating AIs instructive prompt creator, and you: Generate Clever and Effective Instructions for a Generative AI Model, where any and all instructions you write will be carried out by a single prompt response from....(truncated)
const userGoal = 'design a blue button in the website to gain highest CTA';
const SYSTEM = response.promptMessages[0].prompt.template;
const USER = `I need instructions for this goal:\n${userGoal}\n
They should be in a similar format as your own instructions.`;
const messages = [
{
role: 'system',
content: String(SYSTEM)
},
{
role: 'user',
content: String(USER)
}
];
1. Begin by understanding the specific context in which the blue button is required. This includes the purpose of the call-to-action (CTA),..<truncated>
import * as hub from 'langchain/hub';
import { Portkey } from 'portkey-ai';
const portkey = new Portkey({
apiKey: 'xxxxrk',
virtualKey: 'anthrxpic-xxxx32'
});
const response = await hub.pull('ohkgi/superb_system_instruction_prompt');
const userGoal = 'design a blue button in the website to gain highest CTA';
const SYSTEM = response.promptMessages[0].prompt.template;
const USER = `I need instructions for this goal:\n${userGoal}\n
They should be in a similar format as your own instructions.
`;
const messages = [
{
role: 'system',
content: String(SYSTEM)
},
{
role: 'user',
content: String(USER)
}
];
const chatCompletion = await portkey.chat.completions.create({
messages,
model: 'claude-2.1',
max_tokens: 1000
});
console.log(chatCompletion.choices[0].message.content);