MCPcopy
hub / github.com/weaviate/weaviate / GetMessage

Method GetMessage

modules/generative-cohere/clients/cohere.go:283–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281}
282
283func (rm *responseMessage) GetMessage() string {
284 if rm.ErrorMessage != "" {
285 return rm.ErrorMessage
286 }
287 if len(rm.Content) > 0 {
288 return rm.Content[0].Text
289 }
290 return ""
291}
292
293// UnmarshalJSON implements custom unmarshaling for responseMessage
294func (rm *responseMessage) UnmarshalJSON(data []byte) error {

Callers 2

GenerateMethod · 0.45
TestGetAnswerFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestGetAnswerFunction · 0.36