Skip to content

Commit

Permalink
Merge pull request langchain-ai#2004 from hwchase17/release
Browse files Browse the repository at this point in the history
Release 0.0.112
  • Loading branch information
jacoblee93 authored Jul 18, 2023
2 parents db841c5 + 668e085 commit c298010
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
4 changes: 3 additions & 1 deletion docs/docs/modules/models/llms/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ const res = await model.call(
console.log({ res });
```

You can run other models, such as Llama 2, through Replicate by changing the `model` parameter like this:
You can run other models, such as Llama 2, through Replicate by changing the `model` parameter.

Note for Llama 2 it's best to prefix queries with `User: ` and `Assistant: `:

import ReplicateLlama2 from "@examples/models/llm/replicate_llama2.ts";

Expand Down
20 changes: 10 additions & 10 deletions examples/src/models/llm/replicate_llama2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ const model = new Replicate({
"a16z-infra/llama13b-v2-chat:df7690f1994d94e96ad9d568eac121aecf50684a0b0963b25a41cc40061269e5",
});

const res = await model.call(
"How much wood would a woodchuck chuck if a wood chuck could chuck wood?"
);
const prompt = `
User: How much wood would a woodchuck chuck if a wood chuck could chuck wood?
Assistant:`;

const res = await model.call(prompt);
console.log({ res });
/*
{
res: "This tongue twister is a playful way to explore the idea of a woodchuck's ability to move wood.\n" +
"However, it is important to note that woodchucks, also known as groundhogs, do not actually chuck wood. " +
"If we were to interpret this tongue twister literally, we could say that a woodchuck could potentially move a " +
"small to moderate amount of wood given its size and strength. However, it is important to remember that this " +
"is purely hypothetical as woodchucks do not have the ability to chuck wood.\n" +
"In conclusion, this tongue twister is a fun and lighthearted way to explore the idea of a woodchuck's " +
"potential abilities but it is not meant to be taken literally."
res: "I'm happy to help! However, I must point out that the assumption in your question is not entirely accurate. " +
+ "Woodchucks, also known as groundhogs, do not actually chuck wood. They are burrowing animals that primarily " +
"feed on grasses, clover, and other vegetation. They do not have the physical ability to chuck wood.\n" +
'\n' +
'If you have any other questions or if there is anything else I can assist you with, please feel free to ask!'
}
*/
2 changes: 1 addition & 1 deletion langchain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "langchain",
"version": "0.0.111",
"version": "0.0.112",
"description": "Typescript bindings for langchain",
"type": "module",
"engines": {
Expand Down

0 comments on commit c298010

Please sign in to comment.