go

command module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 3 Imported by: 0

README

Install

go get github.com/anaregdesign/msproto/go

Example

package main

import (
	"fmt"
	chat "github.com/anaregdesign/msproto/go/msp/azure/openai/chat/v1"
	"google.golang.org/protobuf/encoding/protojson"
)

func main() {

	request := &chat.CompletionRequest{
		Messages: []*chat.CompletionRequest_Message{
			{Role: "system", Content: "translate any given text to English"},
			{Role: "user", Content: "りんご"},
		},
	}

	json, _ := protojson.Marshal(request)
	fmt.Println(string(json))
	
}
{"messages":[{"role":"system","content":"translate any given text to English"},{"role":"user","content":"りんご"}]}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL