"graphbolt/src/shared_memory_helper.h" did not exist on "aa562f7ebe682a3ef6c34d60c7cfb9952078b3d7"
Commit 8a41b244 authored by Matt Williams's avatar Matt Williams
Browse files

add golang gen


Signed-off-by: default avatarMatt Williams <m@technovangelist.com>
parent fc6b49be
package main
import (
"bytes"
"fmt"
"net/http"
"os"
"io"
"log"
)
func main() {
body := []byte(`{"model":"mistral"}`)
resp, err := http.Post("http://localhost:11434/api/generate", "application/json", bytes.NewBuffer(body))
if err != nil {
fmt.Print(err.Error())
os.Exit(1)
}
responseData, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(responseData))
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment