chatlas 0.8.0__tar.gz → 0.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of chatlas might be problematic. Click here for more details.
- {chatlas-0.8.0 → chatlas-0.8.1}/CHANGELOG.md +4 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/PKG-INFO +1 -1
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_chat.py +51 -23
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_version.py +2 -2
- {chatlas-0.8.0 → chatlas-0.8.1}/.github/workflows/check-update-types.yml +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/.github/workflows/docs-publish.yml +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/.github/workflows/release.yml +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/.github/workflows/test.yml +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/.gitignore +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/.vscode/extensions.json +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/.vscode/settings.json +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/LICENSE +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/Makefile +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/README.md +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/__init__.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_anthropic.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_auto.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_callbacks.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_content.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_content_image.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_content_pdf.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_databricks.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_display.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_github.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_google.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_groq.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_interpolate.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_live_render.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_logging.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_merge.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_ollama.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_openai.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_perplexity.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_provider.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_snowflake.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_tokens.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_tokens_old.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_tools.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_turn.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_typing_extensions.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/_utils.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/py.typed +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/__init__.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/anthropic/__init__.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/anthropic/_client.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/anthropic/_client_bedrock.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/anthropic/_submit.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/google/__init__.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/google/_client.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/google/_submit.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/openai/__init__.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/openai/_client.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/openai/_client_azure.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/chatlas/types/openai/_submit.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/.gitignore +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/_extensions/machow/interlinks/.gitignore +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/_extensions/machow/interlinks/_extension.yml +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/_extensions/machow/interlinks/interlinks.lua +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/_quarto.yml +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/_sidebar.yml +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/congressional-assets.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/examples/third-party-testing.txt +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/get-started.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/images/congressional-assets.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/images/logo.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/images/posit-logo.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/images/tool-calling-right.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/images/tool-calling-wrong.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/index.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/favicon/android-chrome-192x192.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/favicon/android-chrome-512x512.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/favicon/apple-touch-icon.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/favicon/favicon-16x16.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/favicon/favicon-32x32.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/favicon/favicon.ico +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/icon/brand-yml-icon-black.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/icon/brand-yml-icon-black.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/icon/brand-yml-icon-color.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/icon/brand-yml-icon-color.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/icon/brand-yml-icon-white.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/icon/brand-yml-icon-white.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/tall/brand-yml-tall-black.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/tall/brand-yml-tall-black.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/tall/brand-yml-tall-color.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/tall/brand-yml-tall-color.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/tall/brand-yml-tall-white.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/tall/brand-yml-tall-white.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/wide/brand-yml-wide-black.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/wide/brand-yml-wide-black.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/wide/brand-yml-wide-color.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/wide/brand-yml-wide-color.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/wide/brand-yml-wide-large-black.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/wide/brand-yml-wide-large-color.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/wide/brand-yml-wide-large-white.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/wide/brand-yml-wide-white.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/logos/wide/brand-yml-wide-white.svg +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/prompt-design.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/rag.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/Chat.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/ChatAnthropic.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/ChatAzureOpenAI.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/ChatBedrockAnthropic.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/ChatGithub.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/ChatGoogle.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/ChatGroq.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/ChatOllama.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/ChatOpenAI.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/ChatPerplexity.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/ChatVertex.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/Provider.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/Tool.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/Turn.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/content_image_file.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/content_image_plot.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/content_image_url.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/image_file.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/image_plot.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/image_url.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/index.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/interpolate.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/interpolate_file.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/token_usage.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.ChatResponse.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.ChatResponseAsync.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.Content.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.ContentImage.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.ContentImageInline.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.ContentImageRemote.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.ContentJson.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.ContentText.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.ContentToolRequest.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.ContentToolResult.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.ImageContentTypes.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.MISSING.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.MISSING_TYPE.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.SubmitInputArgsT.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/reference/types.TokenUsage.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/structured-data.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/styles.scss +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/tool-calling.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/docs/web-apps.qmd +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/pyproject.toml +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/pytest.ini +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/scripts/_generate_anthropic_types.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/scripts/_generate_google_types.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/scripts/_generate_openai_types.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/scripts/_utils.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/scripts/main.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/__init__.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/__snapshots__/test_chat.ambr +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/apples.pdf +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/conftest.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/images/dice.png +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_auto.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_callbacks.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_chat.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_content.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_content_image.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_content_pdf.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_content_tools.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_interpolate.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_provider_anthropic.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_provider_azure.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_provider_bedrock.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_provider_databricks.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_provider_google.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_provider_openai.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_provider_snowflake.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_tokens.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_turns.py +0 -0
- {chatlas-0.8.0 → chatlas-0.8.1}/tests/test_utils_merge.py +0 -0
|
@@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
7
7
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
|
+
## [0.8.1] - 2025-05-30
|
|
11
|
+
|
|
12
|
+
* Fixed `@overload` definitions for `.stream()` and `.stream_async()`.
|
|
13
|
+
|
|
10
14
|
## [0.8.0] - 2025-05-30
|
|
11
15
|
|
|
12
16
|
### New features
|
|
@@ -418,9 +418,12 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
418
418
|
Whether to run the app in a background thread. If `None`, the app will
|
|
419
419
|
run in a background thread if the current environment is a notebook.
|
|
420
420
|
echo
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
421
|
+
One of the following (defaults to `"none"` when `stream=True` and `"text"` when
|
|
422
|
+
`stream=False`):
|
|
423
|
+
- `"text"`: Echo just the text content of the response.
|
|
424
|
+
- `"output"`: Echo text and tool call content.
|
|
425
|
+
- `"all"`: Echo both the assistant and user turn.
|
|
426
|
+
- `"none"`: Do not echo any content.
|
|
424
427
|
content
|
|
425
428
|
Whether to display text content or all content (i.e., tool calls).
|
|
426
429
|
kwargs
|
|
@@ -508,8 +511,11 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
508
511
|
Parameters
|
|
509
512
|
----------
|
|
510
513
|
echo
|
|
511
|
-
|
|
512
|
-
|
|
514
|
+
One of the following (default is "output"):
|
|
515
|
+
- `"text"`: Echo just the text content of the response.
|
|
516
|
+
- `"output"`: Echo text and tool call content.
|
|
517
|
+
- `"all"`: Echo both the assistant and user turn.
|
|
518
|
+
- `"none"`: Do not echo any content.
|
|
513
519
|
stream
|
|
514
520
|
Whether to stream the response (i.e., have the response appear in chunks).
|
|
515
521
|
kwargs
|
|
@@ -546,8 +552,11 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
546
552
|
args
|
|
547
553
|
The user input(s) to generate a response from.
|
|
548
554
|
echo
|
|
549
|
-
|
|
550
|
-
|
|
555
|
+
One of the following (default is "output"):
|
|
556
|
+
- `"text"`: Echo just the text content of the response.
|
|
557
|
+
- `"output"`: Echo text and tool call content.
|
|
558
|
+
- `"all"`: Echo both the assistant and user turn.
|
|
559
|
+
- `"none"`: Do not echo any content.
|
|
551
560
|
stream
|
|
552
561
|
Whether to stream the response (i.e., have the response appear in
|
|
553
562
|
chunks).
|
|
@@ -596,8 +605,11 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
596
605
|
args
|
|
597
606
|
The user input(s) to generate a response from.
|
|
598
607
|
echo
|
|
599
|
-
|
|
600
|
-
|
|
608
|
+
One of the following (default is "output"):
|
|
609
|
+
- `"text"`: Echo just the text content of the response.
|
|
610
|
+
- `"output"`: Echo text and tool call content.
|
|
611
|
+
- `"all"`: Echo both the assistant and user turn.
|
|
612
|
+
- `"none"`: Do not echo any content.
|
|
601
613
|
stream
|
|
602
614
|
Whether to stream the response (i.e., have the response appear in
|
|
603
615
|
chunks).
|
|
@@ -635,7 +647,7 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
635
647
|
def stream(
|
|
636
648
|
self,
|
|
637
649
|
*args: Content | str,
|
|
638
|
-
content: Literal["text"],
|
|
650
|
+
content: Literal["text"] = "text",
|
|
639
651
|
echo: EchoOptions = "none",
|
|
640
652
|
kwargs: Optional[SubmitInputArgsT] = None,
|
|
641
653
|
) -> Generator[str, None, None]: ...
|
|
@@ -652,8 +664,8 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
652
664
|
def stream(
|
|
653
665
|
self,
|
|
654
666
|
*args: Content | str,
|
|
655
|
-
echo: EchoOptions = "none",
|
|
656
667
|
content: Literal["text", "all"] = "text",
|
|
668
|
+
echo: EchoOptions = "none",
|
|
657
669
|
kwargs: Optional[SubmitInputArgsT] = None,
|
|
658
670
|
) -> Generator[str | ContentToolRequest | ContentToolResult, None, None]:
|
|
659
671
|
"""
|
|
@@ -663,11 +675,15 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
663
675
|
----------
|
|
664
676
|
args
|
|
665
677
|
The user input(s) to generate a response from.
|
|
666
|
-
echo
|
|
667
|
-
Whether to echo text content, all content (i.e., tool calls), or no
|
|
668
|
-
content.
|
|
669
678
|
content
|
|
670
|
-
Whether to yield just text content
|
|
679
|
+
Whether to yield just text content or include rich content objects
|
|
680
|
+
(e.g., tool calls) when relevant.
|
|
681
|
+
echo
|
|
682
|
+
One of the following (default is "none"):
|
|
683
|
+
- `"text"`: Echo just the text content of the response.
|
|
684
|
+
- `"output"`: Echo text and tool call content.
|
|
685
|
+
- `"all"`: Echo both the assistant and user turn.
|
|
686
|
+
- `"none"`: Do not echo any content.
|
|
671
687
|
kwargs
|
|
672
688
|
Additional keyword arguments to pass to the method used for requesting
|
|
673
689
|
the response.
|
|
@@ -703,7 +719,7 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
703
719
|
async def stream_async(
|
|
704
720
|
self,
|
|
705
721
|
*args: Content | str,
|
|
706
|
-
content: Literal["text"],
|
|
722
|
+
content: Literal["text"] = "text",
|
|
707
723
|
echo: EchoOptions = "none",
|
|
708
724
|
kwargs: Optional[SubmitInputArgsT] = None,
|
|
709
725
|
) -> AsyncGenerator[str, None]: ...
|
|
@@ -720,8 +736,8 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
720
736
|
async def stream_async(
|
|
721
737
|
self,
|
|
722
738
|
*args: Content | str,
|
|
723
|
-
echo: EchoOptions = "none",
|
|
724
739
|
content: Literal["text", "all"] = "text",
|
|
740
|
+
echo: EchoOptions = "none",
|
|
725
741
|
kwargs: Optional[SubmitInputArgsT] = None,
|
|
726
742
|
) -> AsyncGenerator[str | ContentToolRequest | ContentToolResult, None]:
|
|
727
743
|
"""
|
|
@@ -731,11 +747,15 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
731
747
|
----------
|
|
732
748
|
args
|
|
733
749
|
The user input(s) to generate a response from.
|
|
734
|
-
echo
|
|
735
|
-
Whether to echo text content, all content (i.e., tool calls), or no
|
|
736
|
-
content.
|
|
737
750
|
content
|
|
738
|
-
Whether to yield just text content
|
|
751
|
+
Whether to yield just text content or include rich content objects
|
|
752
|
+
(e.g., tool calls) when relevant.
|
|
753
|
+
echo
|
|
754
|
+
One of the following (default is "none"):
|
|
755
|
+
- `"text"`: Echo just the text content of the response.
|
|
756
|
+
- `"output"`: Echo text and tool call content.
|
|
757
|
+
- `"all"`: Echo both the assistant and user turn.
|
|
758
|
+
- `"none"`: Do not echo any content.
|
|
739
759
|
kwargs
|
|
740
760
|
Additional keyword arguments to pass to the method used for requesting
|
|
741
761
|
the response.
|
|
@@ -782,7 +802,11 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
782
802
|
data_model
|
|
783
803
|
A Pydantic model describing the structure of the data to extract.
|
|
784
804
|
echo
|
|
785
|
-
|
|
805
|
+
One of the following (default is "none"):
|
|
806
|
+
- `"text"`: Echo just the text content of the response.
|
|
807
|
+
- `"output"`: Echo text and tool call content.
|
|
808
|
+
- `"all"`: Echo both the assistant and user turn.
|
|
809
|
+
- `"none"`: Do not echo any content.
|
|
786
810
|
stream
|
|
787
811
|
Whether to stream the response (i.e., have the response appear in chunks).
|
|
788
812
|
|
|
@@ -840,7 +864,11 @@ class Chat(Generic[SubmitInputArgsT, CompletionT]):
|
|
|
840
864
|
data_model
|
|
841
865
|
A Pydantic model describing the structure of the data to extract.
|
|
842
866
|
echo
|
|
843
|
-
|
|
867
|
+
One of the following (default is "none"):
|
|
868
|
+
- `"text"`: Echo just the text content of the response.
|
|
869
|
+
- `"output"`: Echo text and tool call content.
|
|
870
|
+
- `"all"`: Echo both the assistant and user turn.
|
|
871
|
+
- `"none"`: Do not echo any content.
|
|
844
872
|
stream
|
|
845
873
|
Whether to stream the response (i.e., have the response appear in chunks).
|
|
846
874
|
Defaults to `True` if `echo` is not "none".
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|