Skip to content

Latest commit

 

History

History
1725 lines (1137 loc) · 591 KB

File metadata and controls

1725 lines (1137 loc) · 591 KB

Chats

Overview

Available Operations

approve_context_prompt_change

ApproveContextPromptChange

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.approve_context_prompt_change(cell_id="<id>", edited_context="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
cell_id str ✔️ UUID
edited_context str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceApproveContextPromptChangeResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

approve_ontology_change

ApproveOntologyChange

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.approve_ontology_change(cell_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
cell_id str ✔️ UUID
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceApproveOntologyChangeResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

attach_agent

AttachAgentToChat

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.attach_agent(chat_id="<id>", agent_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
agent_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceAttachAgentToChatResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

attach_app

AttachApp

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.attach_app(chat_id="<id>", app_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
app_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceAttachAppResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

attach_dashboard

AttachDashboard

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.attach_dashboard(chat_id="<id>", dashboard_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
dashboard_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceAttachDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

attach_dataset

AttachDataset

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.attach_dataset(chat_id="<id>", dataset_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
dataset_id str ✔️ uses latest version
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceAttachDatasetResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

bookmark

Bookmark management

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.bookmark(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceBookmarkChatResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

cancel_stream

CancelStream

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.cancel_stream(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceCancelStreamResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

check_permissions

CheckChatPermissions

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.check_permissions(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceCheckChatPermissionsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

check_health

CheckHealth

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.check_health()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
model Optional[models.TextqlRPCPublicChatLlmModel] ➖ N/A
functional OptionalNullable[bool] ➖ if true, runs actual execution tests (expensive)
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceCheckHealthResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

check_streamlit_health

CheckStreamlitHealth

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.check_streamlit_health(chat_id="<id>", cell_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
cell_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceCheckStreamlitHealthResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

create_chat

CreateChat

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.create_chat(paradigm={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
paradigm models.TextqlRPCPublicParadigmParadigm ✔️ ChatParadigm includes paradigm options
connect_timeout_ms Optional[float] ➖ N/A
model Optional[models.TextqlRPCPublicChatLlmModel] ➖ N/A
message OptionalNullable[str] ➖ optionally pre-fill first message
playbook_id OptionalNullable[str] ➖ optionally associate with a playbook
research OptionalNullable[bool] ➖ whether to enable report mode for this chat
dashboard_mode OptionalNullable[bool] ➖ whether to enable dashboard mode for this chat
methodology Optional[models.TextqlRPCPublicChatMethodology] ➖ N/A
vllm_model_id OptionalNullable[str] ➖ vllm_model_id is the model identifier forwarded to the org's vLLM endpoint.
Only valid when model == MODEL_VLLM. Requires @textql.com superadmin.
fast_mode OptionalNullable[bool] ➖ fast_mode enables Anthropic's fast inference (speed: "fast") for this chat.
Supported on Opus 5 and Opus 4.8. Pricing is 2x standard rates.
max_thinking OptionalNullable[bool] ➖ : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

max_thinking runs extended thinking at max effort with visible reasoning.
Supported on Sonnet 5, Fable 5, Fable 5.1, Opus 4.8, Opus 5, and GPT 5.6 Sol/Terra/Luna.
model_name OptionalNullable[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceCreateChatResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

delete

DeleteChat

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.delete(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceDeleteChatResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

dismiss_questions

DismissQuestions

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.dismiss_questions(cell_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
cell_id str ✔️ UUID
connect_timeout_ms Optional[float] ➖ N/A
answers List[models.TextqlRPCPublicCellsQuestionAnswer] ➖ partial answers
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceDismissQuestionsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

duplicate_chat

DuplicateChat

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.duplicate_chat(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
only_if_different_owner OptionalNullable[bool] ➖ N/A
up_to_cell_id OptionalNullable[str] ➖ N/A
paradigm_options Optional[models.TextqlRPCPublicParadigmParadigmOptions] ➖ N/A
model Optional[models.TextqlRPCPublicChatLlmModel] ➖ N/A
fast_mode OptionalNullable[bool] ➖ N/A
methodology Optional[models.TextqlRPCPublicChatMethodology] ➖ N/A
max_thinking OptionalNullable[bool] ➖ : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceDuplicateChatResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_api_answer

GetAPIChatAnswer

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_api_answer(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetAPIChatAnswerResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_artifact

Full artifact data (lazy load when selected)

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_artifact(artifact_id="<id>", chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
artifact_id str ✔️ Cell ID or composite "cellId:type:url" for multi-artifact cells
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetArtifactResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_auto_attached_files

GetAutoAttachedFiles

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_auto_attached_files(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetAutoAttachedFilesResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get

GetChat

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetChatResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_artifacts_summary

Artifact summaries for drawer (lightweight, for listing)

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_artifacts_summary(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetChatArtifactsSummaryResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_chat_execution_timing

GetChatExecutionTiming

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_chat_execution_timing(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetChatExecutionTimingResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_history

GetChatHistory

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_history(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
limit OptionalNullable[int] ➖ N/A
skip OptionalNullable[int] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetChatHistoryResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_all

GetChats

Example Usage

import os
from textql_sdk import Textql
from textql_sdk.utils import parse_datetime


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_all(created_after=parse_datetime("2023-01-15T01:30:15.01Z"), created_before=parse_datetime("2023-01-15T01:30:15.01Z"))

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
connect_timeout_ms Optional[float] ➖ N/A
member_only Optional[bool] ➖ whether to return only the user's chats or all of the org's chats
search_term OptionalNullable[str] ➖ N/A
limit OptionalNullable[int] ➖ N/A
offset OptionalNullable[int] ➖ N/A
creator_member_id OptionalNullable[str] ➖ N/A
sort_by Optional[models.TextqlRPCPublicChatChatSortField] ➖ N/A
sort_direction Optional[models.TextqlRPCPublicChatChatSortDirection] ➖ N/A
bookmarked_only OptionalNullable[bool] ➖ filter to only bookmarked chats
created_after date ➖ A Timestamp represents a point in time independent of any time zone or local
calendar, encoded as a count of seconds and fractions of seconds at
nanosecond resolution. The count is relative to an epoch at UTC midnight on
January 1, 1970, in the proleptic Gregorian calendar which extends the
Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
second table is needed for interpretation, using a 24-hour linear
smear
.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
restricting to that range, we ensure that we can convert to and from RFC
3339
date strings.

# Examples

Example 1: Compute Timestamp from POSIX time().

Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

struct timeval tv;
gettimeofday(&tv, NULL);

Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

long millis = System.currentTimeMillis();

Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

Instant now = Instant.now();

Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

timestamp = Timestamp()
timestamp.GetCurrentTime()

# JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the
RFC 3339 format. That is, the
format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
where {year} is always expressed using four digits while {month}, {day},
{hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
is required. A ProtoJSON serializer should always use UTC (as indicated by
"Z") when printing the Timestamp type and a ProtoJSON parser should be
able to accept both UTC and other timezones (as indicated by an offset).

For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
the Joda Time's [ISODateTimeFormat.dateTime()](
http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
) to obtain a formatter capable of generating timestamps in this format.
Example 1: 2023-01-15T01:30:15.01Z
Example 2: 2024-12-25T12:00:00Z
created_before date ➖ A Timestamp represents a point in time independent of any time zone or local
calendar, encoded as a count of seconds and fractions of seconds at
nanosecond resolution. The count is relative to an epoch at UTC midnight on
January 1, 1970, in the proleptic Gregorian calendar which extends the
Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
second table is needed for interpretation, using a 24-hour linear
smear
.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
restricting to that range, we ensure that we can convert to and from RFC
3339
date strings.

# Examples

Example 1: Compute Timestamp from POSIX time().

Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

struct timeval tv;
gettimeofday(&tv, NULL);

Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

long millis = System.currentTimeMillis();

Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

Instant now = Instant.now();

Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

timestamp = Timestamp()
timestamp.GetCurrentTime()

# JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the
RFC 3339 format. That is, the
format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
where {year} is always expressed using four digits while {month}, {day},
{hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
is required. A ProtoJSON serializer should always use UTC (as indicated by
"Z") when printing the Timestamp type and a ProtoJSON parser should be
able to accept both UTC and other timezones (as indicated by an offset).

For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
the Joda Time's [ISODateTimeFormat.dateTime()](
http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
) to obtain a formatter capable of generating timestamps in this format.
Example 1: 2023-01-15T01:30:15.01Z
Example 2: 2024-12-25T12:00:00Z
exclude_batch_runs OptionalNullable[bool] ➖ exclude chats created from template batch runs
exclude_unused_playbooks OptionalNullable[bool] ➖ exclude chats created from playbooks that have no user messages beyond the initial prompt
source Optional[models.TextqlRPCPublicChatChatSource] ➖ N/A
has_thread_warning OptionalNullable[bool] ➖ When true (and thread_warning_types empty), only chats that have at least one thread_warning row of any type.
creator_member_ids List[str] ➖ Filter org chats to these creator member IDs (union). Ignored when empty. Supersedes creator_member_id when non-empty.
shared_with_me OptionalNullable[bool] ➖ N/A
exclude_feed OptionalNullable[bool] ➖ N/A
sources List[models.TextqlRPCPublicChatChatSource] ➖ Filter chats by source (union). Ignored when empty. Supersedes the single source when non-empty.
thread_warning_types List[models.TextqlRPCPublicChatThreadWarningType] ➖ Filter to chats with at least one thread_warning of any of these types (union).
topic_ids List[str] ➖ Only chats tagged with at least one of these custom topics
(verdict='tagged'). Ignored when empty.
connector_ids List[int] ➖ Filter chats that have any of these connector IDs in their paradigm options (union). Ignored when empty.
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetChatsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_completion_parameters

GetCompletionParameters

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_completion_parameters(chat_id="<id>", cell_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
cell_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetCompletionParametersResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_completion_parameters_batch

GetCompletionParametersBatch

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_completion_parameters_batch(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
cell_ids List[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetCompletionParametersBatchResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_llm_usage

GetLlmUsage

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_llm_usage(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
include_costs Optional[bool] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetLlmUsageResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_members_with_chats

List distinct chat creators the user can access

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_members_with_chats(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicChatGetMembersWithChatsRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetMembersWithChatsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_playbook_chats

GetPlaybookChats

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.get_playbook_chats(playbook_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
playbook_id str ✔️ UUID
connect_timeout_ms Optional[float] ➖ N/A
limit OptionalNullable[int] ➖ N/A
skip OptionalNullable[int] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceGetPlaybookChatsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

poll_events

PollChatEvents

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.poll_events(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
resume_cursor OptionalNullable[str] ➖ N/A
min_generation Optional[models.MinGeneration] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServicePollChatEventsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

query_one_shot

External API users

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.query_one_shot(question="<value>", paradigm={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
question str ✔️ N/A
paradigm models.TextqlRPCPublicParadigmParadigm ✔️ ChatParadigm includes paradigm options
connect_timeout_ms Optional[float] ➖ N/A
model Optional[models.TextqlRPCPublicChatLlmModel] ➖ N/A
chat_id OptionalNullable[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceQueryOneShotResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

rate_cell

RateChatCell appends a row to cell_rating for every click; thumbs-down also upserts a user_thumbs_down thread_warning.

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.rate_cell(chat_id="<id>", cell_id="<id>", rating="CELL_RATING_UP")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
cell_id str ✔️ N/A
rating models.TextqlRPCPublicChatCellRating ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
reason OptionalNullable[str] ➖ free-text "why" captured from the rating modal
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceRateChatCellResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

reject_context_prompt_change

RejectContextPromptChange

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.reject_context_prompt_change(cell_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
cell_id str ✔️ UUID
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceRejectContextPromptChangeResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

reject_ontology_change

RejectOntologyChange

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.reject_ontology_change(cell_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
cell_id str ✔️ UUID
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceRejectOntologyChangeResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

run

RunChat

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.run(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
latest_complete_cell_id OptionalNullable[str] ➖ N/A
research OptionalNullable[bool] ➖ N/A
model Optional[models.TextqlRPCPublicChatLlmModel] ➖ N/A
fast_mode OptionalNullable[bool] ➖ N/A
max_thinking OptionalNullable[bool] ➖ : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceRunChatResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

send

SendMessage

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.send(chat_id="<id>", message="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
message str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
image_urls List[str] ➖ N/A
message_id OptionalNullable[str] ➖ N/A
steering OptionalNullable[bool] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceSendMessageResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

submit_context_prompt_change

SubmitContextPromptChange

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.submit_context_prompt_change(cell_id="<id>", edited_context="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
cell_id str ✔️ UUID
edited_context str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceSubmitContextPromptChangeResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

submit_questions

Resolve a halted questions cell. Submit hands the answers to the agent and resumes it; Dismiss hands over only the answered count and does NOT resume (the user's next message becomes the dismissal reason).

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.submit_questions(cell_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
cell_id str ✔️ UUID
connect_timeout_ms Optional[float] ➖ N/A
answers List[models.TextqlRPCPublicCellsQuestionAnswer] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceSubmitQuestionsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

unbookmark

UnbookmarkChat

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.unbookmark(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceUnbookmarkChatResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

update

UpdateChat

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.chats.update(chat_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
chat_id str ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
research OptionalNullable[bool] ➖ update report mode
summary OptionalNullable[str] ➖ update chat summary
dashboard_mode OptionalNullable[bool] ➖ update dashboard mode
methodology Optional[models.TextqlRPCPublicChatMethodology] ➖ N/A
fast_mode OptionalNullable[bool] ➖ update fast inference mode
max_thinking OptionalNullable[bool] ➖ : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

update max thinking mode
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ChatServiceUpdateChatResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*