You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/nextra/agents/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,4 +50,4 @@ AgentService
50
50
The AgentService class provides a convenient way to deploy an Agent as a Steamship :ref:`Package<Packages>`.
51
51
52
52
All :class:`steamship.agents.service.agent_service.AgentService` instances contain a ``prompt(self, prompt: str, **kwargs) -> List[Block]`` method from thier base class.
53
-
This method is the core ``chat`` loop: it accepts an inbound ``str`` in the form of a user message, and it produces a list of multimodal ``Block`` objects that contain the response.
53
+
This method is the core ``chat`` loop: it accepts an inbound ``str`` in the form of a user message, and it produces a list of multimodal :py:class:`Block<steamship.data.block.Block>` objects that contain the response.
Copy file name to clipboardExpand all lines: docs/nextra/data/blocks.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ Blocks
5
5
6
6
Blocks are ordered chunks of content within a :ref:`File <Files>`.
7
7
8
-
A ``Block`` may have raw data, plain text, or both. The type of content is indicated by its ``mime_type``.
8
+
A :py:class:`Block<steamship.data.block.Block>` may have raw data, plain text, or both. The type of content is indicated by its ``mime_type``.
9
9
Blocks can store images, videos, audio clips, or any other chunk of data.
10
10
11
11
This means that different packages and plugins may choose divide files into blocks using different schemes.
@@ -16,14 +16,14 @@ The following divisions of this file into blocks are all perfectly fine:
16
16
- Each 10 CSV rows is a block
17
17
- The entire CSV file is one block
18
18
19
-
Metadata and annotations about the content of the ``Block`` added via :ref:`Tags` on the ``Block`` .
19
+
Metadata and annotations about the content of the :py:class:`Block<steamship.data.block.Block>` added via :ref:`Tags` on the :py:class:`Block<steamship.data.block.Block>` .
20
20
21
21
.. _Creating Blocks:
22
22
23
23
Creating Blocks
24
24
---------------
25
25
26
-
Blocks may be created when creating a ``File`` by passing them in the ``blocks`` parameter, or they can be appended
26
+
Blocks may be created when creating a :py:class:`File<steamship.data.file.File>` by passing them in the ``blocks`` parameter, or they can be appended
27
27
to an existing file.
28
28
29
29
Please see ``Block.create()`` and ``File.append_block()``.
@@ -35,7 +35,7 @@ Read the :py:class:`Block PyDoc spec here<steamship.data.block.Block>`.
35
35
Making Block Data Public
36
36
------------------------
37
37
38
-
If you want the raw data bytes of a ``Block`` to be publicly accessible, you can set the parameter ``public_data = True`` when calling ``Block.create()``.
38
+
If you want the raw data bytes of a :py:class:`Block<steamship.data.block.Block>` to be publicly accessible, you can set the parameter ``public_data = True`` when calling ``Block.create()``.
39
39
This is useful if you wish to share a generated image or audio file, or must make the content viewable in a place that cannot
40
-
retain your Steamship API key. You can also change the value of the ``public_data`` flag on an existing ``Block`` by calling
40
+
retain your Steamship API key. You can also change the value of the ``public_data`` flag on an existing :py:class:`Block<steamship.data.block.Block>` by calling
Copy file name to clipboardExpand all lines: docs/nextra/data/files.rst
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@ Files
6
6
Files are the top-level object for any piece of data in a workspace.
7
7
8
8
Files hold bytes of raw data (with a ``mime_type``, and processed data in :ref:`Blocks`.
9
-
A ``File`` may also have a list of :ref:`Tags` (annotations).
9
+
A :py:class:`File<steamship.data.file.File>` may also have a list of :ref:`Tags` (annotations).
10
10
11
-
To do work on a ``File``, it needs to be saved and its content must be in :ref:`Blocks`.
11
+
To do work on a :py:class:`File<steamship.data.file.File>`, it needs to be saved and its content must be in :ref:`Blocks`.
12
12
13
13
There are a few ways to accomplish this:
14
14
15
-
- Create ``File`` and ``Block`` content directly (see below)
15
+
- Create :py:class:`File<steamship.data.file.File>` and :py:class:`Block<steamship.data.block.Block>` content directly (see below)
16
16
- Add raw data directly, then create ``Blocks`` with a :ref:`blockifier plugin<Blockifiers>`
17
17
- Import raw data with a :ref:`File Importer<File Importers>`, then create ``Blocks`` with a :ref:`blockifier plugin<Blockifiers>`
18
18
@@ -33,7 +33,7 @@ Read the :py:class:`File PyDoc spec here<steamship.data.file.File>`.
33
33
Creating Files Directly
34
34
-----------------------
35
35
36
-
The quickest way to create data is to create Files with ``Block`` content directly:
36
+
The quickest way to create data is to create Files with :py:class:`Block<steamship.data.block.Block>` content directly:
37
37
38
38
.. code-block:: python
39
39
@@ -47,7 +47,7 @@ The quickest way to create data is to create Files with ``Block`` content direct
47
47
Making File Data Public
48
48
------------------------
49
49
50
-
If you want the raw data bytes of a ``File`` to be publicly accessible, you can set the parameter ``public_data = True`` when calling ``File.create()``.
50
+
If you want the raw data bytes of a :py:class:`File<steamship.data.file.File>` to be publicly accessible, you can set the parameter ``public_data = True`` when calling ``File.create()``.
51
51
This is useful if you wish to share a generated image or audio file, or must make the content viewable in a place that cannot
52
-
retain your Steamship API key. You can also change the value of the ``public_data`` flag on an existing ``File`` by calling
52
+
retain your Steamship API key. You can also change the value of the ``public_data`` flag on an existing :py:class:`File<steamship.data.file.File>` by calling
Copy file name to clipboardExpand all lines: docs/nextra/data/index.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ Data Model
5
5
6
6
There are only three core concepts you need to know.
7
7
8
-
#. :ref:`Files` are the top level object for storing data. A ``File`` can store raw data and an ordered list of ``Blocks``.
9
-
#. :ref:`Blocks` are chunks of content within a ``File``. They can contain raw data and/or text, and an unordered set of ``Tags``.
10
-
#. :ref:`Tags` are typed annotations on a ``Block`` or ``File``.
8
+
#. :ref:`Files` are the top level object for storing data. A :py:class:`File<steamship.data.file.File>` can store raw data and an ordered list of ``Blocks``.
9
+
#. :ref:`Blocks` are chunks of content within a :py:class:`File<steamship.data.file.File>`. They can contain raw data and/or text, and an unordered set of ``Tags``.
10
+
#. :ref:`Tags` are typed annotations on a :py:class:`Block<steamship.data.block.Block>` or :py:class:`File<steamship.data.file.File>`.
11
11
12
12
13
13
The following diagram shows how data is created and used within Steamship:
Copy file name to clipboardExpand all lines: docs/nextra/data/tags.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,7 +163,7 @@ But Steamship actually supports two types of tags: **File Tags** and **Block Tag
163
163
**Block Tags** annotate text within a :ref:`Block<Blocks>` object:
164
164
165
165
- They are attached to the :ref:`Block<Blocks>` object (``block.tags``)
166
-
- Their ``start_idx`` and ``end_idx`` fields are either both null or both non-null. If both are null, the ``Tag is assumed to apply to the whole ``Block``. They represent offsets into the text that is spanned by that block.
166
+
- Their ``start_idx`` and ``end_idx`` fields are either both null or both non-null. If both are null, the ``Tag is assumed to apply to the whole :py:class:`Block<steamship.data.block.Block>`. They represent offsets into the text that is spanned by that block.
167
167
- They are referenced via the ``blocktag`` keyword in our :ref:`query system<queries>`.
For example, an image ``Generator`` could merge the ``text`` from the input blocks and use it to generate an image ``Block``.
21
+
For example, an image ``Generator`` could merge the ``text`` from the input blocks and use it to generate an image :py:class:`Block<steamship.data.block.Block>`.
22
22
23
23
In addition to the input blocks and instance :ref:`configuration <Plugin Accepting Configuration>`, Generators can also receive
24
24
arbitrary key/value runtime parameters. These are present in ``request.data.options``.
Copy file name to clipboardExpand all lines: docs/nextra/plugins/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Taggers
32
32
-------
33
33
Taggers create :ref:`Tags` (annotations) on :ref:`Files` and :ref:`Blocks`.
34
34
35
-
*Examples*: A text classifier would attach a classification ``Tag`` to a ``Block``, an image object recognizer would add ``Tags`` to a ``Block`` that identified known objects.
35
+
*Examples*: A text classifier would attach a classification :py:class:`Tag<steamship.data.tags.tag.Tag>` to a :py:class:`Block<steamship.data.block.Block>`, an image object recognizer would add ``Tags`` to a :py:class:`Block<steamship.data.block.Block>` that identified known objects.
Copy file name to clipboardExpand all lines: docs/nextra/plugins/using/generators/gpt4.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ The GPT-4 ``Generator`` plugin uses OpenAI's GPT-4 to generate text from a text
7
7
or the continuation of a chat. It can also be used with GPT-3.5 by passing ``"gpt-3.5-turbo"``
8
8
as the ``model`` configuration parameter.
9
9
10
-
The plugin will treat each ``Block`` of the input as an element of a chat. If a ``Block`` has
11
-
a ``Tag`` of kind "role" and name ( "system" | "user" | "assistant" ), the content will be passed
12
-
to OpenAI with the corresponding role. If a ``Block`` does not have a role tag, it will
10
+
The plugin will treat each :py:class:`Block<steamship.data.block.Block>` of the input as an element of a chat. If a :py:class:`Block<steamship.data.block.Block>` has
11
+
a :py:class:`Tag<steamship.data.tags.tag.Tag>` of kind "role" and name ( "system" | "user" | "assistant" ), the content will be passed
12
+
to OpenAI with the corresponding role. If a :py:class:`Block<steamship.data.block.Block>` does not have a role tag, it will
13
13
be passed with the configured default role, which defaults to "user" (see config params below).
14
14
15
15
The plugin handles retrying for rate limits and uses Steamship's OpenAI API key by default,
@@ -25,7 +25,7 @@ The simplest possible example is:
25
25
task.wait()
26
26
joke = task.output.blocks[0].text
27
27
28
-
To build a chat interaction, you can persist the prompt components to a ``File`` object,
28
+
To build a chat interaction, you can persist the prompt components to a :py:class:`File<steamship.data.file.File>` object,
29
29
tagging them with their conversational roles:
30
30
31
31
.. code-block:: python
@@ -51,7 +51,7 @@ tagging them with their conversational roles:
51
51
joke = task.output.blocks[0].text
52
52
53
53
In the example above, in addition to being returned as the result of the ``Task``, the output
54
-
``Block`` is appended to ``chat_file``.
54
+
:py:class:`Block<steamship.data.block.Block>` is appended to ``chat_file``.
55
55
56
56
All output ``Blocks`` will be tagged with the "assistant" role to allow more
**Blocks of an existing File** You can pass the generator a ``File`` id to work on, optionally passing a subset of blocks:
40
+
**Blocks of an existing File** You can pass the generator a :py:class:`File<steamship.data.file.File>` id to work on, optionally passing a subset of blocks:
41
41
42
42
.. code-block:: python
43
43
@@ -78,8 +78,8 @@ The output to a ``generate`` operation is :ref:`Blocks`. You can always get thes
78
78
79
79
blocks = generator_task.output.blocks
80
80
81
-
By default, this output is **not** saved to a ``File``. If you wish the result to be persisted,
82
-
you can pass ``append_output_to_file=True`` to the call, and it will be persisted to a **new** ``File``:
81
+
By default, this output is **not** saved to a :py:class:`File<steamship.data.file.File>`. If you wish the result to be persisted,
82
+
you can pass ``append_output_to_file=True`` to the call, and it will be persisted to a **new** :py:class:`File<steamship.data.file.File>`:
83
83
84
84
.. code-block:: python
85
85
@@ -90,7 +90,7 @@ you can pass ``append_output_to_file=True`` to the call, and it will be persiste
90
90
blocks = generator_task.output.blocks
91
91
new_file_id = blocks[0].file_id
92
92
93
-
If you want the output to be appended to an existing ``File``, just pass its id as well:
93
+
If you want the output to be appended to an existing :py:class:`File<steamship.data.file.File>`, just pass its id as well:
0 commit comments