@@ -29,20 +29,34 @@ Learn about ConvoStack and what sets it apart from other AI chatbot software:
29
29
30
30
## Getting Started
31
31
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.
46
60
47
61
## Installation
48
62
0 commit comments