## Stream Messages `client.Beta.Chat.Stream(ctx, sessionID, params) (*BetaChatStreamResponse, error)` **post** `/api/v1/chat/{session_id}/messages/stream` Stream agent events for a chat turn as Server-Sent Events. ### Parameters - `sessionID string` - `params BetaChatStreamParams` - `IndexIDs param.Field[[]string]` Body param: Indexes to retrieve data from. - `Prompt param.Field[string]` Body param: User message for this chat turn. - `OrganizationID param.Field[string]` Query param - `ProjectID param.Field[string]` Query param ### Returns - `type BetaChatStreamResponse interface{…}` ### Example ```go 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"), ) response, err := client.Beta.Chat.Stream( context.TODO(), "session_id", llamacloudprod.BetaChatStreamParams{ IndexIDs: []string{"idx-abc123", "idx-def456"}, Prompt: "What were the main findings in Q3?", }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json {} ```