Skip to content

Commit

Permalink
readme: Include imports
Browse files Browse the repository at this point in the history
  • Loading branch information
tmc committed Mar 20, 2024
1 parent 8f66065 commit 6e7d055
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@
This is a simple example of how to use the library to create a simple chatbot that uses OpenAI to generate responses.

```go
func ExampleMessageGraph() {
import (
"context"
"errors"
"fmt"
"testing"

"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
"github.com/tmc/langchaingo/schema"
"github.com/tmc/langgraphgo/graph"
)

func main() {
model, err := openai.New()
if err != nil {
panic(err)
Expand Down

0 comments on commit 6e7d055

Please sign in to comment.