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 3ef953e

Browse files
Update README.md
1 parent e0ff258 commit 3ef953e

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

‎README.md‎

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,34 @@ 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 guide:
33-
34-
- [Quickstart: ConvoStack Playground (React, Express, TypeScript)](https://docs.convostack.ai/getting-started/quickstart-react-express-playground)
35-
- Support and 'chat with your docs' agent
36-
- Pinecone
37-
- OpenAI
38-
- Web crawler for loading docs
39-
- Langchain
40-
- "ChatGPT" agent
41-
- OpenAI
42-
- Langchain
43-
- Bare-bones Conversational QA agent
44-
- OpenAI
45-
- Langchain
32+
Get your AI chatbot up and running in minutes with our [quickstart guide](https://docs.convostack.ai/getting-started/):
33+
34+
In the following example, we are connecting a Langchain OpenAI [LLM](https://js.langchain.com/docs/modules/models/llms/) to the chatbot playground.
35+
36+
```typescript
37+
import { playground } from "convostack/playground";
38+
import { OpenAI } from "langchain/llms/openai";
39+
40+
playground({
41+
reply(context: IAgentContext): Promise<IAgentResponse> {
42+
// `humanMessage` is the content of each message the user sends via the chatbot playground.
43+
let humanMessage = context.getHumanMessage().content;
44+
// `agent` is the OpenAI agent we want to use to respond to each `humanMessage`
45+
const agent = new OpenAI();
46+
// `call` is a simple string-in, string-out method for interacting with the OpenAI agent.
47+
const resp = await model.call(humanMessage);
48+
// `resp` is the generated agent's response to the user's `humanMessage`
49+
return {
50+
content: resp,
51+
contentType: "markdown",
52+
};
53+
},
54+
});
55+
```
56+
**See the code above in action:**
57+
![ConvoStack Quickstart Example 1](https://github.com/ConvoStack/convostack/assets/8688852/f917120c-f0a7-440a-96b4-982ba2d4fdad)
58+
59+
Follow our [quickstart guide](https://docs.convostack.ai/getting-started/) for more Langchain + ConvoStack examples.
4660

4761
## Installation
4862

0 commit comments

Comments
(0)

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