Skip to content

tool not called #3

Description

@czyt

when need call tool
response

create a golang demo here

● {"tool_calls": [{"id": "call_1", "type": "function", "function": {"name": "WriteToFile", "arguments": "{path: main.go, content: package mainnnimport (ntfmtnttimen)nnfunc main() {ntfmt.Println(Welcome to Go Demo!)ntnt// Basic
  variablesntname := Gopherntage := 5ntntfmt.Printf(Hello, %s! You are %d years old.n, name, age)ntnt// Slice examplentfruits := []string{apple, banana, orange}ntfmt.Println(Fruits:, fruits)ntnt// Map examplentscores :=
  map[string]int{nttAlice: 95,nttBob:   87,nttCarol: 92,nt}ntntfmt.Println(Scores:)ntfor name, score := range scores {nttfmt.Printf(%s: %dn, name, score)nt}ntnt// Function callntresult := add(10, 20)ntfmt.Printf(10 + 20 = %dn,
  result)ntnt// Goroutine examplentgo greet(World)ntnt// Wait a moment for goroutinenttime.Sleep(100 * time.Millisecond)n}nnfunc add(a, b int) int {ntreturn a + bn}nnfunc greet(name string) {ntfmt.Printf(Hello from goroutine,
  %s!n, name)n}}"}}]}

  {"tool_calls": [{"id": "call_2", "type": "function", "function": {"name": "WriteToFile", "arguments": "{path: go.mod, content: module golang-demonngo 1.21}"}}]}

  {"tool_calls": [{"id": "call_3", "type": "function", "function": {"name": "Bash", "arguments": "{command: go run main.go}"}}]}

  Created a Go demo with variables, slices, maps, functions, and goroutines. Run with go run main.go.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions