(Rag)
- Query - Query using RAG Search
Query across your connected data sources using RAG Search
package main
import(
gosdk "github.com/panoratech/go-sdk"
"context"
"github.com/panoratech/go-sdk/models/components"
"log"
)
func main() {
s := gosdk.New(
gosdk.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Rag.Query(ctx, "<value>", components.QueryBody{
Query: "When does Panora incorporated?",
TopK: gosdk.Float64(3),
})
if err != nil {
log.Fatal(err)
}
if res.RagQueryOutputs != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
xConnectionToken |
string | ✔️ | The connection token |
queryBody |
components.QueryBody | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.QueryResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |