Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 17a2bea

Browse files
Update README.md
1 parent 1262dce commit 17a2bea

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎README.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,25 @@ Learn about ConvoStack and what sets it apart from other AI chatbot software:
2929

3030
## Getting Started
3131

32-
Get your AI chatbot up and running in minutes with our [quickstart repo and guide](https://github.com/ConvoStack/quickstart):
32+
Get your AI chatbot up and running in minutes with our [Quickstart repo and guide](https://github.com/ConvoStack/quickstart):
3333

3434
In the following example, we are connecting a Langchain OpenAI [LLM](https://js.langchain.com/docs/modules/models/llms/) to the chatbot playground.
3535

3636
```typescript
37+
import * as dotenv from "dotenv";
38+
// Configures the OpenAI API key
39+
dotenv.config();
40+
3741
import { playground } from "convostack/playground";
42+
import { IAgentContext, IAgentResponse } from "convostack/agent";
3843
import { OpenAI } from "langchain/llms/openai";
3944

4045
playground({
41-
reply(context: IAgentContext): Promise<IAgentResponse> {
46+
asyncreply(context: IAgentContext): Promise<IAgentResponse> {
4247
// `humanMessage` is the content of each message the user sends via the chatbot playground.
4348
let humanMessage = context.getHumanMessage().content;
4449
// `agent` is the OpenAI agent we want to use to respond to each `humanMessage`
45-
const agent = new OpenAI();
50+
const agent = new OpenAI({ modelName: "gpt-3.5-turbo" });
4651
// `call` is a simple string-in, string-out method for interacting with the OpenAI agent.
4752
const resp = await model.call(humanMessage);
4853
// `resp` is the generated agent's response to the user's `humanMessage`

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /