Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Omar-V2
Copy link
Collaborator

@Omar-V2 Omar-V2 commented Nov 21, 2025

  • Introduced a new message type FileContent to represent file attachments (e.g., PDFs, documents) in chat messages (referenced through ids of already uploaded files).
  • Updated the Content message to include a field for FileContent.
  • Added a new enum value TOOL_CALL_TYPE_DOCUMENT_SEARCH_TOOL to ToolCallType for server-side document search functionality.

- Introduced a new message type `FileContent` to represent file attachments (e.g., PDFs, documents) in chat messages (referenced through ids of already uploaded files).
- Updated the `Content` message to include a field for `FileContent`.
- Added a new enum value `TOOL_CALL_TYPE_DOCUMENT_SEARCH_TOOL` to `ToolCallType` for server-side document search functionality.
@Omar-V2 Omar-V2 requested a review from a team as a code owner November 21, 2025 00:15
@github-actions
Copy link

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedNov 21, 2025, 12:17 AM

@Omar-V2 Omar-V2 merged commit 2d88cf3 into main Nov 21, 2025
4 checks passed
@Omar-V2 Omar-V2 deleted the feat/add-file-content branch November 21, 2025 00:19
tbourrillon added a commit to fpinsight/xai-grpc-client that referenced this pull request Nov 26, 2025
Implement support for the latest xai-proto features:
- max_turns: Control maximum agentic tool calling iterations
- File attachments: Support file uploads via FileContent
- Include options: Control optional response fields (tool outputs, citations)

New API methods:
- ChatRequest::with_max_turns() - Set maximum tool calling turns
- ChatRequest::user_with_file() - Attach files to messages
- ChatRequest::add_include_option() - Add include options
- ChatRequest::with_include_options() - Set all include options

Changes:
- Add max_turns field to ChatRequest
- Add File variant to ContentPart for file attachments
- Add IncludeOption enum support with getter methods
- Update proto conversion to handle new fields
- Export IncludeOption for public use

All tests passing. Implements features from:
- xai-org/xai-proto#18 (tool outputs & citations)
- xai-org/xai-proto#17 (max_turns for agentic conversations)
- xai-org/xai-proto#16 (file attachment support)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants