Skip to content

Commit 2d2c517

Browse files
deploy: 1bc05fe
0 parents  commit 2d2c517

26 files changed

Lines changed: 7785 additions & 0 deletions

.nojekyll

Whitespace-only changes.

core.html

Lines changed: 1272 additions & 0 deletions
Large diffs are not rendered by default.

core.html.md

Lines changed: 740 additions & 0 deletions
Large diffs are not rendered by default.

index.html

Lines changed: 663 additions & 0 deletions
Large diffs are not rendered by default.

index.html.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# dialoghelper
2+
3+
4+
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
5+
6+
This file will become your README and also the index of your
7+
documentation.
8+
9+
## Developer Guide
10+
11+
If you are new to using `nbdev` here are some useful pointers to get you
12+
started.
13+
14+
### Install dialoghelper in Development mode
15+
16+
``` sh
17+
# make sure dialoghelper package is installed in development mode
18+
$ pip install -e .
19+
20+
# make changes under nbs/ directory
21+
# ...
22+
23+
# compile to have changes apply to dialoghelper
24+
$ nbdev_prepare
25+
```
26+
27+
## Usage
28+
29+
### Installation
30+
31+
Install latest from the GitHub
32+
[repository](https://github.com/AnswerDotAI/dialoghelper):
33+
34+
``` sh
35+
$ pip install git+https://github.com/AnswerDotAI/dialoghelper.git
36+
```
37+
38+
or from [conda](https://anaconda.org/AnswerDotAI/dialoghelper)
39+
40+
``` sh
41+
$ conda install -c AnswerDotAI dialoghelper
42+
```
43+
44+
or from [pypi](https://pypi.org/project/dialoghelper/)
45+
46+
``` sh
47+
$ pip install dialoghelper
48+
```
49+
50+
### Documentation
51+
52+
Documentation can be found hosted on this GitHub
53+
[repository](https://github.com/AnswerDotAI/dialoghelper)’s
54+
[pages](https://AnswerDotAI.github.io/dialoghelper/). Additionally you
55+
can find package manager specific guidelines on
56+
[conda](https://anaconda.org/AnswerDotAI/dialoghelper) and
57+
[pypi](https://pypi.org/project/dialoghelper/) respectively.
58+
59+
## How to use
60+
61+
Fill me in please! Don’t forget code examples:
62+
63+
``` python
64+
1+1
65+
```
66+
67+
2

robots.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Sitemap: https://AnswerDotAI.github.io/dialoghelper/sitemap.xml

search.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[
2+
{
3+
"objectID": "index.html",
4+
"href": "index.html",
5+
"title": "dialoghelper",
6+
"section": "",
7+
"text": "This file will become your README and also the index of your documentation.",
8+
"crumbs": [
9+
"dialoghelper"
10+
]
11+
},
12+
{
13+
"objectID": "index.html#developer-guide",
14+
"href": "index.html#developer-guide",
15+
"title": "dialoghelper",
16+
"section": "Developer Guide",
17+
"text": "Developer Guide\nIf you are new to using nbdev here are some useful pointers to get you started.\n\nInstall dialoghelper in Development mode\n# make sure dialoghelper package is installed in development mode\n$ pip install -e .\n\n# make changes under nbs/ directory\n# ...\n\n# compile to have changes apply to dialoghelper\n$ nbdev_prepare",
18+
"crumbs": [
19+
"dialoghelper"
20+
]
21+
},
22+
{
23+
"objectID": "index.html#usage",
24+
"href": "index.html#usage",
25+
"title": "dialoghelper",
26+
"section": "Usage",
27+
"text": "Usage\n\nInstallation\nInstall latest from the GitHub repository:\n$ pip install git+https://github.com/AnswerDotAI/dialoghelper.git\nor from conda\n$ conda install -c AnswerDotAI dialoghelper\nor from pypi\n$ pip install dialoghelper\n\n\nDocumentation\nDocumentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on conda and pypi respectively.",
28+
"crumbs": [
29+
"dialoghelper"
30+
]
31+
},
32+
{
33+
"objectID": "index.html#how-to-use",
34+
"href": "index.html#how-to-use",
35+
"title": "dialoghelper",
36+
"section": "How to use",
37+
"text": "How to use\nFill me in please! Don’t forget code examples:\n\n1+1\n\n2",
38+
"crumbs": [
39+
"dialoghelper"
40+
]
41+
},
42+
{
43+
"objectID": "core.html",
44+
"href": "core.html",
45+
"title": "dialoghelper",
46+
"section": "",
47+
"text": "Re-export asdict:\nsource",
48+
"crumbs": [
49+
"dialoghelper"
50+
]
51+
},
52+
{
53+
"objectID": "core.html#importing-and-exporting-dialogs",
54+
"href": "core.html#importing-and-exporting-dialogs",
55+
"title": "dialoghelper",
56+
"section": "Importing and Exporting Dialogs",
57+
"text": "Importing and Exporting Dialogs\nWe use json serialization of list[dict] to represent a dialogue where dict is a serialized solveit.db_dc Message.\n\nSupported Fields\n\nfrom dialoghelper.db_dc import Message\n\n\nMessage.__annotations__\n\n{'sid': str | None,\n 'mid': str | None,\n 'content': str | None,\n 'output': str | None,\n 'input_tokens': int | None,\n 'output_tokens': int | None,\n 'msg_type': str | None,\n 'time_run': str | None,\n 'is_exported': int | None,\n 'skipped': int | None,\n 'did': int | None,\n 'i_collapsed': int | None,\n 'o_collapsed': int | None,\n 'header_collapsed': int | None,\n 'pinned': int | None}\n\n\nWhen exporting and importing we intentionally leave out these fields: - sid - to avoid duplicating sids across dialogues - mid - to ensure mid respects ordering in the new dialogue - did - since the dialogue will be imported into a different dialogue - time_run - since a dialogue may be imported/exported to other environments where execution time is not comparable.\nThe following are required: - content - msg_type - output\nAll other fields (i_collapsed, header_collapsed, … etc) are technically optional. By default we read them on import if they are available. However, there may be other dialog-consuming applications (shell sage, discord buddy, others) we want to share dialogues with where these fields are not supported by the interface.\n\n\nAttachments\nFor now attachments are not included in the importing and exporting.\nAttachments could be added as a future enhanement but would add some additional design considerations - if attachments refer to external artifacts, do the artifacts get copied? Do they get bundled as part of the export artifact? Do we create a new artifact entry with a new sid for the new dialogue or do we share artifacts?\n\n\nImplementation\n\nsource\n\n\nexport_dialog\n\n export_dialog (filename:str, did:int=None)\n\nExport dialog messages and optionally attachments to JSON\n\ntry:\n test_path = Path('test.json')\n export_dialog(test_path)\n test_msgs = test_path.read_json()\n print(test_msgs['messages'][1]['content'])\nfinally: test_path.unlink(missing_ok=True)\n\nhello world\n\n\n\nsource\n\n\nimport_dialog\n\n import_dialog (fname, add_header=True)\n\nImport dialog messages from JSON file using add_msg",
58+
"crumbs": [
59+
"dialoghelper"
60+
]
61+
}
62+
]

site_libs/bootstrap/bootstrap-06f49dda7689f94c7678c1763e921aac.min.css

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)