Categorygithub.com/anaregdesign/msproto/go
package
0.0.6
Repository: https://github.com/anaregdesign/msproto.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# 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":"りんご"}]}