Skip to content

Commit

Permalink
docs(readme): update examples to use claude-2 (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie authored Jul 11, 2023
1 parent 736e53b commit 97bd635
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const anthropic = new Anthropic({

async function main() {
const completion = await anthropic.completions.create({
model: 'claude-1',
model: 'claude-2',
max_tokens_to_sample: 300,
prompt: `${Anthropic.HUMAN_PROMPT} how does a court case get to the Supreme Court? ${Anthropic.AI_PROMPT}`,
});
Expand All @@ -121,7 +121,7 @@ const anthropic = new Anthropic();

const stream = await anthropic.completions.create({
prompt: `${Anthropic.HUMAN_PROMPT} Your prompt here ${Anthropic.AI_PROMPT}`,
model: 'claude-1',
model: 'claude-2',
stream: true,
max_tokens_to_sample: 300,
});
Expand Down Expand Up @@ -149,7 +149,7 @@ async function main() {
const params: Anthropic.CompletionCreateParams = {
prompt: `${Anthropic.HUMAN_PROMPT} how does a court case get to the Supreme Court? ${Anthropic.AI_PROMPT}`,
max_tokens_to_sample: 300,
model: 'claude-1',
model: 'claude-2',
};
const completion: Anthropic.Completion = await anthropic.completions.create(params);
}
Expand All @@ -170,7 +170,7 @@ async function main() {
.create({
prompt: `${Anthropic.HUMAN_PROMPT} Your prompt here ${Anthropic.AI_PROMPT}`,
max_tokens_to_sample: 300,
model: 'claude-1',
model: 'claude-2',
})
.catch((err) => {
if (err instanceof Anthropic.APIError) {
Expand Down Expand Up @@ -216,7 +216,7 @@ await anthropic.completions.create(
{
prompt: `${Anthropic.HUMAN_PROMPT} Can you help me effectively ask for a raise at work? ${Anthropic.AI_PROMPT}`,
max_tokens_to_sample: 300,
model: 'claude-1',
model: 'claude-2',
},
{
maxRetries: 5,
Expand All @@ -241,7 +241,7 @@ await anthropic.completions.create(
{
prompt: `${Anthropic.HUMAN_PROMPT} Where can I get a good coffee in my neighbourhood? ${Anthropic.AI_PROMPT}`,
max_tokens_to_sample: 300,
model: 'claude-1',
model: 'claude-2',
},
{
timeout: 5 * 1000,
Expand Down Expand Up @@ -276,7 +276,7 @@ await anthropic.completions.create(
{
prompt: `${Anthropic.HUMAN_PROMPT} How does a court case get to the Supreme Court? ${Anthropic.AI_PROMPT}`,
max_tokens_to_sample: 300,
model: 'claude-1',
model: 'claude-2',
},
{
baseURL: 'http://localhost:8080/test-api',
Expand Down

0 comments on commit 97bd635

Please sign in to comment.