repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/memory_strategies/main.go | examples/memory_strategies/main.go | package main
import (
"context"
"fmt"
"time"
"github.com/smallnest/langgraphgo/memory"
)
func main() {
ctx := context.Background()
fmt.Println("=== Memory Strategies Examples ===")
// 1. Sequential Memory
fmt.Println("1. Sequential Memory (Keep-It-All)")
fmt.Println(" - Stores all messages without limit... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/ptc_simple/main.go | examples/ptc_simple/main.go | package main
import (
"context"
"fmt"
"log"
"github.com/smallnest/langgraphgo/ptc"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
"github.com/tmc/langchaingo/tools"
)
// CalculatorTool performs arithmetic operations
type CalculatorTool struct{}
func (t CalculatorTool) Name() strin... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/complex_parallel_execution/main.go | examples/complex_parallel_execution/main.go | package main
import (
"context"
"fmt"
"log"
"time"
"github.com/smallnest/langgraphgo/graph"
)
func main() {
// Create a new state graph
g := graph.NewStateGraph[map[string]any]()
// Define Schema
// We use a map schema where "results" is a list that accumulates values
// and "branch_status" tracks which b... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/rag_with_embeddings/main.go | examples/rag_with_embeddings/main.go | package main
import (
"context"
"fmt"
"log"
"github.com/smallnest/langgraphgo/graph"
"github.com/smallnest/langgraphgo/rag"
"github.com/smallnest/langgraphgo/rag/retriever"
"github.com/smallnest/langgraphgo/rag/store"
"github.com/tmc/langchaingo/llms/openai"
)
func main() {
ctx := context.Background()
llm... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/rag_falkordb_simple/main.go | examples/rag_falkordb_simple/main.go | package main
import (
"context"
"fmt"
"log"
"strings"
"github.com/redis/go-redis/v9"
"github.com/smallnest/langgraphgo/rag"
"github.com/smallnest/langgraphgo/rag/store"
)
func main() {
ctx := context.Background()
// Create FalkorDB knowledge graph
fmt.Println("Initializing FalkorDB knowledge graph...")
f... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/chat_agent_dynamic_tools/main.go | examples/chat_agent_dynamic_tools/main.go | package main
import (
"context"
"fmt"
"log"
"github.com/smallnest/langgraphgo/prebuilt"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
"github.com/tmc/langchaingo/tools"
)
// SimpleMockModel is a simple mock model for demonstration
type SimpleMockModel struct {
turnCount int
}
fu... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/memory_chatbot/main.go | examples/memory_chatbot/main.go | package main
import (
"context"
"fmt"
"log"
"github.com/smallnest/langgraphgo/memory"
"github.com/tmc/langchaingo/llms"
langchainmemory "github.com/tmc/langchaingo/memory"
)
func main() {
ctx := context.Background()
fmt.Println("=== Memory-Enabled Chatbot Simulation ===")
// Example 1: Chatbot with Conver... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/generic_state_graph_listenable/main.go | examples/generic_state_graph_listenable/main.go | package main
import (
"context"
"fmt"
"github.com/smallnest/langgraphgo/graph"
)
// TypedState represents a strongly typed state
type TypedState struct {
Count int
Log []string
}
func main() {
// Create a typed graph
g := graph.NewListenableStateGraph[TypedState]()
// Add a node
node := g.AddNode("incre... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/supervisor/main.go | examples/supervisor/main.go | package main
import (
"context"
"fmt"
"log"
"os"
"strconv"
"strings"
"time"
"github.com/smallnest/langgraphgo/graph"
"github.com/smallnest/langgraphgo/prebuilt"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
"github.com/tmc/langchaingo/tools"
)
// CalculatorTool (same as in re... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/subgraph/main.go | examples/subgraph/main.go | package main
import (
"context"
"fmt"
"github.com/smallnest/langgraphgo/graph"
)
func main() {
fmt.Println("=== Subgraph Example ===")
// 1. Define Main Graph
main := graph.NewStateGraph[map[string]any]()
// 2. Define Subgraph 1 (Validation)
validationSubgraph := graph.NewStateGraph[map[string]any]()
vali... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/memory_agent/main.go | examples/memory_agent/main.go | package main
import (
"bufio"
"context"
"fmt"
"os"
"strings"
"time"
"github.com/smallnest/langgraphgo/memory"
)
// AgentState represents the state of our chat agent
type AgentState struct {
Messages []string
UserInput string
Response string
MemoryStats *memory.Stats
CurrentTopic string
}
// ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/react_agent/main.go | examples/react_agent/main.go | package main
import (
"context"
"fmt"
"log"
"strconv"
"strings"
"github.com/smallnest/langgraphgo/prebuilt"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
"github.com/tmc/langchaingo/tools"
)
// CalculatorTool is a simple tool for demonstration
type CalculatorTool struct{}
func ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/command_api/main.go | examples/command_api/main.go | package main
import (
"context"
"fmt"
"log"
"github.com/smallnest/langgraphgo/graph"
)
func main() {
// Create a new state graph
g := graph.NewStateGraph[any]()
g.AddNode("router", "router", func(ctx context.Context, state any) (any, error) {
m := state.(map[string]any)
val := m["value"].(int)
if val >... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/generic_state_graph/main.go | examples/generic_state_graph/main.go | package main
import (
"context"
"fmt"
"log"
"github.com/smallnest/langgraphgo/graph"
)
// UserRequest represents the input to our workflow
type UserRequest struct {
Name string
Age int
Country string
}
// WorkflowState represents the state of our workflow with full type safety
type WorkflowState struc... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/rag_with_langchain/main.go | examples/rag_with_langchain/main.go | package main
import (
"context"
"fmt"
"log"
"github.com/smallnest/langgraphgo/graph"
"github.com/smallnest/langgraphgo/rag"
"github.com/smallnest/langgraphgo/rag/retriever"
"github.com/smallnest/langgraphgo/rag/store"
"github.com/tmc/langchaingo/llms/openai"
)
func main() {
ctx := context.Background()
llm... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/context_store/main.go | examples/context_store/main.go | package main
import (
"context"
"fmt"
"time"
"github.com/smallnest/langgraphgo/graph"
)
type ProcessState struct {
Step int
Data string
History []string
}
func main() {
// Create a checkpointable graph with typed state
g := graph.NewCheckpointableStateGraph[ProcessState]()
// Define state schema wi... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/context_store/sqlite/main.go | examples/context_store/sqlite/main.go | package main
import (
"context"
"encoding/json"
"fmt"
"os"
"time"
"github.com/smallnest/langgraphgo/graph"
"github.com/smallnest/langgraphgo/store/sqlite"
)
type ProcessState struct {
Step int
Data string
History []string
}
func main() {
// Check for Sqlite DB path
dbPath := os.Getenv("SQLITE_DB_P... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/context_store/postgres/main.go | examples/context_store/postgres/main.go | package main
import (
"context"
"encoding/json"
"fmt"
"os"
"time"
"github.com/smallnest/langgraphgo/graph"
"github.com/smallnest/langgraphgo/store/postgres"
)
type ProcessState struct {
Step int
Data string
History []string
}
func main() {
// Check for Postgres connection string
connString := os.G... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/context_store/redis/main.go | examples/context_store/redis/main.go | package main
import (
"context"
"encoding/json"
"fmt"
"os"
"time"
"github.com/smallnest/langgraphgo/graph"
"github.com/smallnest/langgraphgo/store/redis"
)
type ProcessState struct {
Step int
Data string
History []string
}
func main() {
// Check for Redis address
redisAddr := os.Getenv("REDIS_ADDR... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/rag_falkordb_graph/main.go | examples/rag_falkordb_graph/main.go | package main
import (
"context"
"fmt"
"log"
"strings"
"time"
"github.com/smallnest/langgraphgo/adapter"
"github.com/smallnest/langgraphgo/rag"
"github.com/smallnest/langgraphgo/rag/engine"
"github.com/smallnest/langgraphgo/rag/store"
"github.com/tmc/langchaingo/llms/openai"
)
func main() {
ctx := context.... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/payment_interrupt/main.go | examples/payment_interrupt/main.go | package main
import (
"context"
"errors"
"fmt"
"log"
"strings"
"github.com/smallnest/langgraphgo/graph"
)
// OrderState represents the state of an order with payment processing
type OrderState struct {
OrderID string
Amount float64
PaymentStatus string
PaymentMethod string
TransactionID strin... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/subgraphs/main.go | examples/subgraphs/main.go | package main
import (
"context"
"fmt"
"github.com/smallnest/langgraphgo/graph"
)
func main() {
// 1. Create a child graph
child := graph.NewStateGraph[map[string]any]()
child.AddNode("child_process", "child_process", func(ctx context.Context, state map[string]any) (map[string]any, error) {
state["child_visit... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/goskills_example/main.go | examples/goskills_example/main.go | package main
import (
"context"
"fmt"
"log"
"os"
"strings"
"github.com/smallnest/goskills"
adapter "github.com/smallnest/langgraphgo/adapter/goskills"
"github.com/smallnest/langgraphgo/prebuilt"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
"github.com/tmc/langchaingo/tools"
)
... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/chat_agent/main.go | examples/chat_agent/main.go | package main
import (
"context"
"fmt"
"log"
"github.com/smallnest/langgraphgo/prebuilt"
"github.com/tmc/langchaingo/llms/openai"
)
func main() {
fmt.Println("=== ChatAgent Multi-Turn Conversation Demo ===")
fmt.Println()
llm, err := openai.New()
if err != nil {
log.Fatal(err)
}
// Create ChatAgent wit... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/rag_advanced/main.go | examples/rag_advanced/main.go | package main
import (
"context"
"fmt"
"log"
"strings"
"github.com/smallnest/langgraphgo/graph"
"github.com/smallnest/langgraphgo/rag"
"github.com/smallnest/langgraphgo/rag/retriever"
"github.com/smallnest/langgraphgo/rag/splitter"
"github.com/smallnest/langgraphgo/rag/store"
"github.com/tmc/langchaingo/llms... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/rag_pipeline/main.go | examples/rag_pipeline/main.go | package main
import (
"context"
"fmt"
"log"
"os"
"github.com/smallnest/langgraphgo/graph"
"github.com/smallnest/langgraphgo/rag"
"github.com/smallnest/langgraphgo/rag/retriever"
"github.com/smallnest/langgraphgo/rag/store"
"github.com/tmc/langchaingo/llms/openai"
)
func main() {
// Check for OpenAI API key... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/tool_exa/main.go | examples/tool_exa/main.go | package main
import (
"context"
"fmt"
"log"
"os"
"github.com/smallnest/langgraphgo/prebuilt"
"github.com/smallnest/langgraphgo/tool"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
"github.com/tmc/langchaingo/tools"
)
func main() {
// Check for API keys
if os.Getenv("EXA_API_KEY... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/create_agent/main.go | examples/create_agent/main.go | package main
import (
"context"
"fmt"
"log"
"os"
"github.com/smallnest/langgraphgo/prebuilt"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
"github.com/tmc/langchaingo/tools"
)
// WeatherTool is a simple tool to get weather
type WeatherTool struct{}
func (t *WeatherTool) Name() s... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/reflexive_metacognitive_cn/main.go | examples/reflexive_metacognitive_cn/main.go | // Reflexive Metacognitive Agent (Chinese Version)
// 这是一个实现 Fareed Khan 的 Agentic Architectures 系列中的“反思性元认知 Agent”架构的示例。
package main
import (
"context"
"fmt"
"log"
"os"
"strings"
"github.com/smallnest/langgraphgo/graph"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
)
// ======... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/mcp_agent/main.go | examples/mcp_agent/main.go | package main
import (
"context"
"fmt"
"log"
"os"
"path/filepath"
"github.com/smallnest/langgraphgo/adapter/mcp"
"github.com/smallnest/langgraphgo/prebuilt"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
)
func main() {
ctx := context.Background()
// 1. Create MCP client from C... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/dynamic_skill_agent/main.go | examples/dynamic_skill_agent/main.go | package main
import (
"context"
"fmt"
"log"
"os"
"github.com/smallnest/langgraphgo/prebuilt"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
"github.com/tmc/langchaingo/tools"
)
func main() {
// 1. Initialize LLM
if os.Getenv("OPENAI_API_KEY") == "" {
log.Fatal("OPENAI_API_KEY ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/examples/listeners/main.go | examples/listeners/main.go | package main
import (
"context"
"fmt"
"time"
"github.com/smallnest/langgraphgo/graph"
)
func main() {
// Create a listenable graph
g := graph.NewListenableStateGraph[map[string]any]()
// Define nodes
processNode := g.AddNode("process", "process", func(ctx context.Context, state map[string]any) (map[string]a... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/adapter/llm_adapter_test.go | adapter/llm_adapter_test.go | package adapter
import (
"context"
"errors"
"testing"
"github.com/tmc/langchaingo/llms"
)
// mockLLM is a mock implementation of llms.Model for testing
type mockLLM struct {
generateResponse string
generateError error
generateContentResult *llms.ContentResponse
generateContentError error
calls... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/adapter/llm_adapter.go | adapter/llm_adapter.go | package adapter
import (
"context"
"github.com/tmc/langchaingo/llms"
)
// OpenAIAdapter adapts langchaingo's LLM to a simple interface
type OpenAIAdapter struct {
llm llms.Model
}
// NewOpenAIAdapter creates a new adapter for OpenAI LLM
func NewOpenAIAdapter(llm llms.Model) *OpenAIAdapter {
return &OpenAIAdapte... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/adapter/doc.go | adapter/doc.go | // Package adapter provides integration adapters for connecting LangGraph Go with external systems and frameworks.
//
// Adapters act as bridges between LangGraph's internal representations and external APIs,
// protocols, or frameworks. They enable seamless integration with a wide ecosystem of tools,
// services, and ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/adapter/goskills/goskills.go | adapter/goskills/goskills.go | package goskills
import (
"context"
"encoding/json"
"fmt"
"os"
"path/filepath"
"strings"
"github.com/smallnest/goskills"
"github.com/smallnest/goskills/tool"
"github.com/tmc/langchaingo/tools"
)
// SkillTool implements tools.Tool for goskills.
type SkillTool struct {
name string
description string
... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/adapter/goskills/doc.go | adapter/goskills/doc.go | // Package goskills provides an adapter for integrating GoSkills with LangGraph Go agents.
//
// GoSkills is a framework for defining and executing skills in Go. This adapter allows
// GoSkills-defined skills to be used as tools within LangGraph agents, enabling agents
// to execute Go code, shell commands, and custom ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/adapter/goskills/goskills_test.go | adapter/goskills/goskills_test.go | package goskills
import (
"context"
"encoding/json"
"os"
"path/filepath"
"testing"
"github.com/smallnest/goskills"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tmc/langchaingo/tools"
)
// MockSkillPackage 模拟 goskills.SkillPackage 接口
type MockSkillPackage struct {
p... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/adapter/mcp/doc.go | adapter/mcp/doc.go | // Package mcp provides an adapter for integrating Model Context Protocol (MCP) tools with LangGraph Go agents.
//
// MCP is an open protocol that allows AI assistants to securely connect to external data sources
// and tools. This adapter enables LangGraph agents to use MCP-compliant tools and services,
// providing a... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/adapter/mcp/mcp.go | adapter/mcp/mcp.go | package mcp
import (
"context"
"encoding/json"
"fmt"
"github.com/sashabaranov/go-openai"
mcpclient "github.com/smallnest/goskills/mcp"
"github.com/tmc/langchaingo/tools"
)
// MCPTool implements tools.Tool for MCP (Model Context Protocol) tools.
type MCPTool struct {
name string
description string
cli... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/adapter/mcp/mcp_test.go | adapter/mcp/mcp_test.go | package mcp
import (
"context"
"os"
"path/filepath"
"testing"
"github.com/sashabaranov/go-openai"
mcpclient "github.com/smallnest/goskills/mcp"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tmc/langchaingo/tools"
)
func TestMCPTool_Interface(t *testing.T) {
// Verif... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/log/golog_logger.go | log/golog_logger.go | package log
import (
"github.com/kataras/golog"
)
// GologLogger implements Logger interface using kataras/golog
type GologLogger struct {
logger *golog.Logger
level LogLevel
}
var _ Logger = (*GologLogger)(nil)
// NewGologLogger creates a new logger using an existing golog.Logger
func NewGologLogger(logger *go... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/log/golog_logger_test.go | log/golog_logger_test.go | package log
import (
"testing"
"github.com/kataras/golog"
"github.com/stretchr/testify/assert"
)
func TestNewGologLogger(t *testing.T) {
// Create a golog logger
glogger := golog.New()
// Create our GologLogger
logger := NewGologLogger(glogger)
assert.NotNil(t, logger)
assert.Equal(t, LogLevelInfo, logger... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/log/doc.go | log/doc.go | // Package log provides a simple, leveled logging interface for LangGraph Go applications.
//
// This package implements a lightweight logging system with support for different log levels
// and customizable output destinations. It's designed to integrate seamlessly with the
// LangGraph execution engine, particularly ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/log/logger.go | log/logger.go | package log
import (
"fmt"
"io"
"log"
"os"
)
// LogLevel represents logging severity
type LogLevel int
const (
// LogLevelDebug for detailed debugging information
LogLevelDebug LogLevel = iota
// LogLevelInfo for general informational messages
LogLevelInfo
// LogLevelWarn for warning messages
LogLevelWarn
... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/log/logger_test.go | log/logger_test.go | package log
import (
"bytes"
"strings"
"testing"
)
// TestDefaultLogger tests the default logger functionality
func TestDefaultLogger(t *testing.T) {
var buf bytes.Buffer
logger := NewCustomLogger(&buf, LogLevelDebug)
logger.Debug("debug message")
logger.Info("info message")
logger.Warn("warn message")
logg... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/python_tool.go | tool/python_tool.go | package tool
import (
"bytes"
"fmt"
"os"
"os/exec"
"text/template"
)
type PythonTool struct {
}
func (t *PythonTool) Run(args map[string]any, code string) (string, error) {
tmpl, err := template.New("python").Parse(code)
if err != nil {
return "", fmt.Errorf("failed to parse python template: %w", err)
}
... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/tools_uncovered_test.go | tool/tools_uncovered_test.go | package tool
import (
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
// Tests for file_tool.go
func TestReadFile(t *testing.T) {
// Create a temporary file for testing
tmpDir := t.TempDir()
testFile := f... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/brave.go | tool/brave.go | package tool
import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"strings"
)
// BraveSearch is a tool that uses the Brave Search API to search the web.
type BraveSearch struct {
APIKey string
BaseURL string
Count int
Country string
Lang string
}
type BraveOption func(*BraveSearch)
/... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/bocha.go | tool/bocha.go | package tool
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"os"
"strings"
)
// BochaSearch is a tool that uses the Bocha API to search the web.
type BochaSearch struct {
APIKey string
BaseURL string
Count int
Freshness string
Summary bool
}
type BochaOption func(*BochaSearch)
//... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/definitions.go | tool/definitions.go | package tool
import (
openai "github.com/sashabaranov/go-openai"
)
// GetBaseTools returns the list of base tools available to all skills.
func GetBaseTools() []openai.Tool {
return []openai.Tool{
{
Type: openai.ToolTypeFunction,
Function: &openai.FunctionDefinition{
Name: "run_shell_code",
D... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/knowledge_tool.go | tool/knowledge_tool.go | package tool
import (
"context"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"strings"
"time"
)
// WikipediaSearch performs a search on Wikipedia for the given query and returns a summary.
// It uses the Wikipedia API.
func WikipediaSearch(query string) (string, error) {
baseURL := "https://en.wikipedia.o... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/web_tool.go | tool/web_tool.go | package tool
import (
"fmt"
"net/http"
"time"
"github.com/PuerkitoBio/goquery"
)
// WebFetch retrieves the main text content from a given URL.
// It uses goquery to parse the HTML and extract text, removing script and style tags.
func WebFetch(urlString string) (string, error) {
client := http.Client{
Timeout... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/shell_tool.go | tool/shell_tool.go | package tool
import (
"bytes"
"fmt"
"os"
"os/exec"
"text/template"
)
type ShellTool struct {
}
func (t *ShellTool) Run(args map[string]any, code string) (string, error) {
tmpl, err := template.New("shell").Parse(code)
if err != nil {
return "", fmt.Errorf("failed to parse shell template: %w", err)
}
var ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/exa.go | tool/exa.go | package tool
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"os"
"strings"
)
// ExaSearch is a tool that uses the Exa API to search the web.
type ExaSearch struct {
APIKey string
BaseURL string
NumResults int
}
type ExaOption func(*ExaSearch)
// WithExaBaseURL sets the base URL for the... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/doc.go | tool/doc.go | // Package tool provides a collection of ready-to-use tools for LangGraph Go agents.
//
// This package includes various tools that extend agent capabilities, including
// web search, file operations, code execution, and integration with popular
// APIs and services. Tools are designed to be easily integrated with preb... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/tool_test.go | tool/tool_test.go | package tool
import (
"context"
"net/http"
"net/http/httptest"
"os"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestTavilySearch_Interface(t *testing.T) {
os.Setenv("TAVILY_API_KEY", "test-key")
defer os.Unsetenv("TAVILY_API_KEY")
tool, err := NewTavilySearc... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/file_tool.go | tool/file_tool.go | package tool
import (
"fmt"
"os"
)
// ReadFile reads the content of a file and returns it as a string.
func ReadFile(filePath string) (string, error) {
content, err := os.ReadFile(filePath)
if err != nil {
return "", fmt.Errorf("failed to read file '%s': %w", filePath, err)
}
return string(content), nil
}
//... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/tool/tavily.go | tool/tavily.go | package tool
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"os"
"strings"
)
// TavilySearch is a tool that uses the Tavily API to search the web.
type TavilySearch struct {
APIKey string
BaseURL string
SearchDepth string
}
type TavilyOption func(*TavilySearch)
// WithTavilyBaseURL s... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/executor_test.go | ptc/executor_test.go | package ptc_test
import (
"context"
"strings"
"testing"
"time"
"github.com/smallnest/langgraphgo/ptc"
"github.com/tmc/langchaingo/tools"
)
// TestModeDirectExecution tests that ModeDirect mode actually executes tools
func TestModeDirectExecution(t *testing.T) {
tools := []tools.Tool{
MockTool{
name: ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/ptc_agent_test.go | ptc/ptc_agent_test.go | package ptc_test
import (
"context"
"strings"
"testing"
"github.com/smallnest/langgraphgo/ptc"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/tools"
)
// MockLLM for testing
type MockLLM struct {
response string
callCount int
}
func (m *MockLLM) GenerateContent(ctx context.Context, messages ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/tool_server.go | ptc/tool_server.go | package ptc
import (
"context"
"encoding/json"
"fmt"
"net"
"net/http"
"sync"
"time"
"github.com/smallnest/langgraphgo/log"
"github.com/tmc/langchaingo/tools"
)
// ToolServer provides an HTTP API for tool execution
// This allows code in any language to call Go tools via HTTP
type ToolServer struct {
tools ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/executor.go | ptc/executor.go | package ptc
import (
"context"
"encoding/json"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/smallnest/langgraphgo/log"
"github.com/tmc/langchaingo/tools"
)
// ExecutionLanguage defines the programming language for code execution
type ExecutionLanguage string
const (
LanguagePython Ex... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/ptc_agent.go | ptc/ptc_agent.go | package ptc
import (
"context"
"fmt"
"strings"
"github.com/smallnest/langgraphgo/graph"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/tools"
)
// PTCAgentConfig configures a PTC agent
type PTCAgentConfig struct {
// Model is the LLM to use
Model llms.Model
// Tools are the available tools
... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/ptc_agent_additional_test.go | ptc/ptc_agent_additional_test.go | package ptc
import (
"context"
"fmt"
"net/http"
"net/http/httptest"
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/tools"
)
// MockTool for testing
type MockTool struct {
name string
descr... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/doc.go | ptc/doc.go | // Package ptc (Programmatic Tool Calling) provides advanced tool execution capabilities for LangGraph Go agents.
//
// This package implements a novel approach to tool calling where agents generate code to use tools
// programmatically, rather than using traditional function calling APIs. This enables more flexible,
/... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/examples_test.go | ptc/examples_test.go | package ptc_test
import (
"context"
"encoding/json"
"fmt"
"testing"
"github.com/smallnest/langgraphgo/ptc"
"github.com/tmc/langchaingo/tools"
)
// MockTool for testing
type MockTool struct {
name string
description string
response string
}
func (t MockTool) Name() string {
return t.name
}
func ... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/test_utils.go | ptc/test_utils.go | package ptc
import (
"context"
)
// mockTool is a simple mock tool for testing
// Defined as lowercase to make it package-private but accessible to tests
type mockTool struct {
name string
description string
response string
}
func (t mockTool) Name() string {
return t.name
}
func (t mockTool) Descrip... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/ptc_node.go | ptc/ptc_node.go | package ptc
import (
"context"
"encoding/json"
"fmt"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/tools"
)
// PTCToolNode is a graph node that handles programmatic tool calling
// It receives code from the LLM and executes it with tool access
type PTCToolNode struct {
Executor *CodeExecutor
}
... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/logger_test.go | ptc/logger_test.go | package ptc
import (
"bytes"
"context"
"strings"
"testing"
"github.com/smallnest/langgraphgo/log"
"github.com/tmc/langchaingo/tools"
)
// TestLogger tests the logging functionality using package-level logger
func TestLogger(t *testing.T) {
// Save original logger
originalLogger := log.GetDefaultLogger()
def... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/ptc/edge_cases_test.go | ptc/edge_cases_test.go | package ptc
import (
"context"
"strings"
"testing"
"time"
"github.com/smallnest/langgraphgo/log"
"github.com/tmc/langchaingo/tools"
)
// TestPackageLevelLogging tests using package-level logging functions
func TestPackageLevelLogging(t *testing.T) {
// Save original logger
originalLogger := log.GetDefaultLog... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/llms/doubao/options.go | llms/doubao/options.go | package doubao
import (
"net/http"
"os"
"github.com/tmc/langchaingo/callbacks"
)
// ModelName represents the model identifier for Doubao (Volcengine Ark) API.
//
// IMPORTANT: You should use your custom Endpoint ID (推理接入点ID) as the model name.
// To create an endpoint and get your Endpoint ID, visit:
// https://w... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/llms/doubao/doubaollm.go | llms/doubao/doubaollm.go | package doubao
import (
"context"
"errors"
"fmt"
"strings"
"github.com/tmc/langchaingo/callbacks"
"github.com/tmc/langchaingo/llms"
"github.com/volcengine/volcengine-go-sdk/service/arkruntime"
"github.com/volcengine/volcengine-go-sdk/service/arkruntime/model"
)
var (
ErrEmptyResponse = errors.New("no respon... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
smallnest/langgraphgo | https://github.com/smallnest/langgraphgo/blob/600df7fe3e6254f2329f606732feaecfbd52d9f2/llms/doubao/doubaollm_test.go | llms/doubao/doubaollm_test.go | package doubao
import (
"context"
"os"
"testing"
"github.com/tmc/langchaingo/llms"
"github.com/volcengine/volcengine-go-sdk/service/arkruntime/model"
)
// getTestModel returns the model name from env or empty string.
//
// IMPORTANT: The Doubao API requires custom Endpoint IDs that you create in the
// Volcengi... | go | MIT | 600df7fe3e6254f2329f606732feaecfbd52d9f2 | 2026-01-07T10:38:05.929544Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.