-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
437b585
commit d252d9e
Showing
9 changed files
with
154 additions
and
2 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
docs/_freeze/concepts/attachments/execute-results/html.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"hash": "e1d529a819e9e68cc7f0a9043ae41cbb", | ||
"result": { | ||
"engine": "jupyter", | ||
"markdown": "---\ntitle: Attachments\n---\n\n\n\nIbis Birdbrain passes Python objects as `Attachments` to [`Messages`](./messages.qmd). This allows the user, itself, and (eventually) other bots to interact with data, code, and more.\n\n\n## Usage\n\n\n::: {#77a9f256 .cell execution_count=1}\n``` {.python .cell-code}\nfrom ibis_birdbrain.attachments import Attachment, Attachments\n\na1 = Attachment(content=\"Hello, world!\")\na1\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\nAttachment\n **guid**: aefa7dd8-1504-466e-afa8-fa0053ef087e\n **time**: 2024-03-05 11:22:38.343515\n **name**: None\n **desc**: None\n```\n:::\n:::\n\n\n## TableAttachment\n\nA `TableAttachment` contains an Ibis table:\n\n::: {#9a87d9f6 .cell execution_count=2}\n``` {.python .cell-code}\nimport ibis\n\nfrom ibis_birdbrain.attachments import TableAttachment\n\nibis.options.interactive = True\n\nt = ibis.examples.penguins.fetch()\n\na2 = TableAttachment(content=t)\na2\n```\n\n::: {.cell-output .cell-output-stderr}\n```\nINFO:pins.cache:cache file: /Users/cody/Library/Caches/pins-py/gcs_332a30997e141da0e08f15fbfae8b3c3ec90463922d117a96fa3b1bef85a2a4c/penguins/20230905T090411Z-9aae2/data.txt\nINFO:pins.cache:cache file: /Users/cody/Library/Caches/pins-py/gcs_332a30997e141da0e08f15fbfae8b3c3ec90463922d117a96fa3b1bef85a2a4c/penguins/20230905T090411Z-9aae2/penguins.csv.gz\n```\n:::\n\n::: {.cell-output .cell-output-display}\n```{=html}\n<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n```\n:::\n\n::: {.cell-output .cell-output-display execution_count=2}\n\n::: {.ansi-escaped-output}\n```{=html}\n<pre>TableAttachment\n **guid**: 5992ed9a-8a14-46c6-9da8-afdb3644a23d\n **time**: 2024-03-05 11:22:40.051587\n **name**: penguins\n **desc**: \nibis.Schema {\n species string\n island string\n bill_length_mm float64\n bill_depth_mm float64\n flipper_length_mm int64\n body_mass_g int64\n sex string\n year int64\n}\n **table**:\n┏━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━┓\n┃<span class=\"ansi-bold\"> </span><span class=\"ansi-bold\">species</span><span class=\"ansi-bold\"> </span>┃<span class=\"ansi-bold\"> </span><span class=\"ansi-bold\">island</span><span class=\"ansi-bold\"> </span><span class=\"ansi-bold\"> </span>┃<span class=\"ansi-bold\"> </span><span class=\"ansi-bold\">bill_length_mm</span><span class=\"ansi-bold\"> </span>┃<span class=\"ansi-bold\"> </span><span class=\"ansi-bold\">bill_depth_mm</span><span class=\"ansi-bold\"> </span>┃<span class=\"ansi-bold\"> </span><span class=\"ansi-bold\">flipper_length_mm</span><span class=\"ansi-bold\"> </span>┃<span class=\"ansi-bold\"> </span><span class=\"ansi-bold\">body_mass_g</span><span class=\"ansi-bold\"> </span>┃<span class=\"ansi-bold\"> </span><span class=\"ansi-bold\">sex</span><span class=\"ansi-bold\"> </span><span class=\"ansi-bold\"> </span>┃<span class=\"ansi-bold\"> </span><span class=\"ansi-bold\">year</span><span class=\"ansi-bold\"> </span><span class=\"ansi-bold\"> </span>┃\n┡━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━┩\n│ string │ string │ float64 │ float64 │ int64 │ int64 │ string │ int64 │\n├─────────┼───────────┼────────────────┼───────────────┼───────────────────┼─────────────┼────────┼───────┤\n│ <span class=\"ansi-green-fg\">Adelie </span> │ <span class=\"ansi-green-fg\">Torgersen</span> │ <span class=\"ansi-cyan-fg ansi-bold\">39.1</span> │ <span class=\"ansi-cyan-fg ansi-bold\">18.7</span> │ <span class=\"ansi-cyan-fg ansi-bold\">181</span> │ <span class=\"ansi-cyan-fg ansi-bold\">3750</span> │ <span class=\"ansi-green-fg\">male </span> │ <span class=\"ansi-cyan-fg ansi-bold\">2007</span> │\n│ <span class=\"ansi-green-fg\">Adelie </span> │ <span class=\"ansi-green-fg\">Torgersen</span> │ <span class=\"ansi-cyan-fg ansi-bold\">39.5</span> │ <span class=\"ansi-cyan-fg ansi-bold\">17.4</span> │ <span class=\"ansi-cyan-fg ansi-bold\">186</span> │ <span class=\"ansi-cyan-fg ansi-bold\">3800</span> │ <span class=\"ansi-green-fg\">female</span> │ <span class=\"ansi-cyan-fg ansi-bold\">2007</span> │\n│ <span class=\"ansi-green-fg\">Adelie </span> │ <span class=\"ansi-green-fg\">Torgersen</span> │ <span class=\"ansi-cyan-fg ansi-bold\">40.3</span> │ <span class=\"ansi-cyan-fg ansi-bold\">18.0</span> │ <span class=\"ansi-cyan-fg ansi-bold\">195</span> │ <span class=\"ansi-cyan-fg ansi-bold\">3250</span> │ <span class=\"ansi-green-fg\">female</span> │ <span class=\"ansi-cyan-fg ansi-bold\">2007</span> │\n│ <span class=\"ansi-green-fg\">Adelie </span> │ <span class=\"ansi-green-fg\">Torgersen</span> │ NULL │ NULL │ NULL │ NULL │ NULL │ <span class=\"ansi-cyan-fg ansi-bold\">2007</span> │\n│ <span class=\"ansi-green-fg\">Adelie </span> │ <span class=\"ansi-green-fg\">Torgersen</span> │ <span class=\"ansi-cyan-fg ansi-bold\">36.7</span> │ <span class=\"ansi-cyan-fg ansi-bold\">19.3</span> │ <span class=\"ansi-cyan-fg ansi-bold\">193</span> │ <span class=\"ansi-cyan-fg ansi-bold\">3450</span> │ <span class=\"ansi-green-fg\">female</span> │ <span class=\"ansi-cyan-fg ansi-bold\">2007</span> │\n│ <span class=\"ansi-green-fg\">Adelie </span> │ <span class=\"ansi-green-fg\">Torgersen</span> │ <span class=\"ansi-cyan-fg ansi-bold\">39.3</span> │ <span class=\"ansi-cyan-fg ansi-bold\">20.6</span> │ <span class=\"ansi-cyan-fg ansi-bold\">190</span> │ <span class=\"ansi-cyan-fg ansi-bold\">3650</span> │ <span class=\"ansi-green-fg\">male </span> │ <span class=\"ansi-cyan-fg ansi-bold\">2007</span> │\n│ <span class=\"ansi-green-fg\">Adelie </span> │ <span class=\"ansi-green-fg\">Torgersen</span> │ <span class=\"ansi-cyan-fg ansi-bold\">38.9</span> │ <span class=\"ansi-cyan-fg ansi-bold\">17.8</span> │ <span class=\"ansi-cyan-fg ansi-bold\">181</span> │ <span class=\"ansi-cyan-fg ansi-bold\">3625</span> │ <span class=\"ansi-green-fg\">female</span> │ <span class=\"ansi-cyan-fg ansi-bold\">2007</span> │\n│ <span class=\"ansi-green-fg\">Adelie </span> │ <span class=\"ansi-green-fg\">Torgersen</span> │ <span class=\"ansi-cyan-fg ansi-bold\">39.2</span> │ <span class=\"ansi-cyan-fg ansi-bold\">19.6</span> │ <span class=\"ansi-cyan-fg ansi-bold\">195</span> │ <span class=\"ansi-cyan-fg ansi-bold\">4675</span> │ <span class=\"ansi-green-fg\">male </span> │ <span class=\"ansi-cyan-fg ansi-bold\">2007</span> │\n│ <span class=\"ansi-green-fg\">Adelie </span> │ <span class=\"ansi-green-fg\">Torgersen</span> │ <span class=\"ansi-cyan-fg ansi-bold\">34.1</span> │ <span class=\"ansi-cyan-fg ansi-bold\">18.1</span> │ <span class=\"ansi-cyan-fg ansi-bold\">193</span> │ <span class=\"ansi-cyan-fg ansi-bold\">3475</span> │ NULL │ <span class=\"ansi-cyan-fg ansi-bold\">2007</span> │\n│ <span class=\"ansi-green-fg\">Adelie </span> │ <span class=\"ansi-green-fg\">Torgersen</span> │ <span class=\"ansi-cyan-fg ansi-bold\">42.0</span> │ <span class=\"ansi-cyan-fg ansi-bold\">20.2</span> │ <span class=\"ansi-cyan-fg ansi-bold\">190</span> │ <span class=\"ansi-cyan-fg ansi-bold\">4250</span> │ NULL │ <span class=\"ansi-cyan-fg ansi-bold\">2007</span> │\n│ … │ … │ … │ … │ … │ … │ … │ … │\n└─────────┴───────────┴────────────────┴───────────────┴───────────────────┴─────────────┴────────┴───────┘</pre>\n```\n:::\n\n:::\n:::\n\n\nNotice the name, description (schema), and preview are automatically populated.\n\n## CodeAttachment\n\nA `CodeAttachment` contains code -- typically Python or SQL:\n\n::: {#89ecfbf6 .cell execution_count=3}\n``` {.python .cell-code}\nfrom ibis_birdbrain.attachments import CodeAttachment\n\na3 = CodeAttachment(content=\"select 1 as id\", language=\"sql\")\na3\n```\n\n::: {.cell-output .cell-output-display execution_count=3}\n```\nCodeAttachment\n **guid**: 8138742b-dcef-4735-b452-8481468e12da\n **time**: 2024-03-05 11:22:40.087917\n **name**: None\n **desc**: None\n **language**: sql\n **code**:\nselect 1 as id\n```\n:::\n:::\n\n\n", | ||
"supporting": [ | ||
"attachments_files" | ||
], | ||
"filters": [], | ||
"includes": { | ||
"include-in-header": [ | ||
"<script src=\"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\" integrity=\"sha512-c3Nl8+7g4LMSTdrm621y7kf9v3SDPnhxLNhcjFJbKECVnmZHTdo+IRO05sNLTH/D3vA6u1X32ehoLC7WFVdheg==\" crossorigin=\"anonymous\"></script>\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js\" integrity=\"sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==\" crossorigin=\"anonymous\" data-relocate-top=\"true\"></script>\n<script type=\"application/javascript\">define('jquery', [],function() {return window.jQuery;})</script>\n" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"hash": "bd2906497289e9de4361517b57031090", | ||
"result": { | ||
"engine": "jupyter", | ||
"markdown": "---\ntitle: Bots\n---\n\n\n\nIbis Birdbrain implements a `Bot` calss that can be used to instantiate one or more bots that automate various tasks.\n\n## Usage\n\n\n::: {#a5d8d0d4 .cell execution_count=1}\n``` {.python .cell-code}\nfrom ibis_birdbrain import Bot\nBot\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\nibis_birdbrain.bot.Bot\n```\n:::\n:::\n\n\n", | ||
"supporting": [ | ||
"bots_files" | ||
], | ||
"filters": [], | ||
"includes": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"hash": "5ca217bfa5ee488df2c050375105b2a1", | ||
"result": { | ||
"engine": "jupyter", | ||
"markdown": "---\ntitle: Flows\n---\n\n\n\nIbis Birdbrain's [`Bot`](./bot.qmd) chooses a `Flow` to execute based on [`Messages`](./messages.qmd).\n\nA Flow takes Messages as input and returns Messages as output. The details of a given Flow are specific to itself, running a series of [`Tasks`](./tasks.qmd) to accomplish its goal.\n\n## Usage\n\n\n::: {#254b2753 .cell execution_count=1}\n``` {.python .cell-code}\nfrom ibis_birdbrain.flows import Flow, Flows\n\nflow = Flow()\nflow\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n<ibis_birdbrain.flows.Flow at 0x1090f15d0>\n```\n:::\n:::\n\n\n", | ||
"supporting": [ | ||
"flows_files" | ||
], | ||
"filters": [], | ||
"includes": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"hash": "a1999ce28adcecc054b19196cb9fa5fb", | ||
"result": { | ||
"engine": "jupyter", | ||
"markdown": "---\ntitle: Messages\n---\n\n\n\nIbis Birdbrain communicates with the user, itself, and (eventually) other bots through `Messages`. A `Message` is a simple wrapper around text with metadata and optional [`Attachments`](./attachments.qmd).\n\n\n## Usage\n\n\n::: {#9c0146d7 .cell execution_count=1}\n``` {.python .cell-code}\nfrom ibis_birdbrain.messages import Message, Messages, Email\n\nm1 = Message(\"Hello, world!\")\nm1\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\nMessage(5956d627-9038-4bb4-b827-1d9ed646c75e)\n```\n:::\n:::\n\n\n## Emails\n\nCurrently, the only implementation of `Message` that is viewable as a proper string is `Email`.\n\n::: {#2e43c663 .cell execution_count=2}\n``` {.python .cell-code}\ne1 = Email(\"Hello\")\ne2 = Email(\", world!\")\n\nmessages = Messages([e1, e2])\nmessages\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\nTo: \nFrom: \nSubject: \nSent at: 2024-03-05 11:22:52.258182\nMessage: e855820a-eedd-4229-96d1-7ae525800995\n\nHello\n\nAttachments:\n\n\n---\nTo: \nFrom: \nSubject: \nSent at: 2024-03-05 11:22:52.258207\nMessage: 50a43477-12d3-4138-b5ff-38fd5b2b7704\n\n, world!\n\nAttachments:\n\n```\n:::\n:::\n\n\n", | ||
"supporting": [ | ||
"messages_files" | ||
], | ||
"filters": [], | ||
"includes": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"hash": "ea522272a8d0a666dacb53873801a1aa", | ||
"result": { | ||
"engine": "jupyter", | ||
"markdown": "---\ntitle: Tasks\n---\n\n\n\nIbis Birdbrain's [`Flow`](./flow.qmd) executes one or more `Tasks` to accomplish its goal. A `Task` is a single unit of work that takes a [`Message`](./message.qmd) as input and returns a `Message` as output.\n\n## Usage\n\n\n::: {#ef7b5518 .cell execution_count=1}\n``` {.python .cell-code}\nfrom ibis_birdbrain.tasks import Task, Tasks\n\ntask = Task()\ntask\n```\n\n::: {.cell-output .cell-output-display execution_count=1}\n```\n<ibis_birdbrain.tasks.Task at 0x14264fa90>\n```\n:::\n:::\n\n\n", | ||
"supporting": [ | ||
"tasks_files" | ||
], | ||
"filters": [], | ||
"includes": {} | ||
} | ||
} |
Oops, something went wrong.