github.com/weaviate/weaviate@v1.24.6/modules/qna-openai/additional/answer/answer_graphql_field.go (about) 1 // _ _ 2 // __ _____ __ ___ ___ __ _| |_ ___ 3 // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ 4 // \ V V / __/ (_| |\ V /| | (_| | || __/ 5 // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| 6 // 7 // Copyright © 2016 - 2024 Weaviate B.V. All rights reserved. 8 // 9 // CONTACT: hello@weaviate.io 10 // 11 12 package answer 13 14 import ( 15 "fmt" 16 17 "github.com/tailor-inc/graphql" 18 ) 19 20 func (p *AnswerProvider) additionalAnswerField(classname string) *graphql.Field { 21 return &graphql.Field{ 22 Type: graphql.NewObject(graphql.ObjectConfig{ 23 Name: fmt.Sprintf("%sAdditionalAnswer", classname), 24 Fields: graphql.Fields{ 25 "result": &graphql.Field{Type: graphql.String}, 26 "startPosition": &graphql.Field{Type: graphql.Int}, 27 "endPosition": &graphql.Field{Type: graphql.Int}, 28 "property": &graphql.Field{Type: graphql.String}, 29 "hasAnswer": &graphql.Field{Type: graphql.Boolean}, 30 }, 31 }), 32 } 33 }