Grep File
client.Beta.Retrieval.Grep(ctx, params) (*PaginatedCursorPost[BetaRetrievalGrepResponse], error)
POST/api/v1/retrieval/files/grep
Grep File
package main
import (
"context"
"fmt"
"github.com/run-llama/llama-parse-go"
"github.com/run-llama/llama-parse-go/option"
)
func main() {
client := llamacloudprod.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Beta.Retrieval.Grep(context.TODO(), llamacloudprod.BetaRetrievalGrepParams{
FileID: "file_id",
IndexID: "idx-abc123",
Pattern: "revenue|profit",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"items": [
{
"content": "content",
"end_char": 0,
"start_char": 0
}
],
"next_page_token": "next_page_token",
"total_size": 0
}Returns Examples
{
"items": [
{
"content": "content",
"end_char": 0,
"start_char": 0
}
],
"next_page_token": "next_page_token",
"total_size": 0
}