Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
c8704d2
Add static and dynamic table sections
AccordionGuy Dec 14, 2024
014cc21
Add DataFrame methods
AccordionGuy Dec 14, 2024
fe0dfbc
Update docs/framework/dataframe.mdx
AccordionGuy Dec 16, 2024
7c8e06a
Update docs/framework/dataframe.mdx
AccordionGuy Dec 16, 2024
b2ab8f8
Update docs/framework/dataframe.mdx
AccordionGuy Dec 16, 2024
bb103a1
Update docs/framework/dataframe.mdx
AccordionGuy Dec 16, 2024
7fcdb00
Update capitalization to EditableDataFrame; plus minor corrections
AccordionGuy Dec 16, 2024
3860958
Add documentation for record() method
AccordionGuy Dec 16, 2024
21d86c8
chore(ui): introduce a logger proxy - WF-85
madeindjs Dec 18, 2024
5ba6893
feat(ui): use `WdsButton` for `BaseCollapseButton` - WF-132
madeindjs Dec 17, 2024
ed254ba
fix(ui): handle long text in `BuilderSelect`
madeindjs Dec 18, 2024
666c3b6
Initial changes
AccordionGuy Dec 19, 2024
1856440
Add sections: intro, enabling download and search
AccordionGuy Dec 19, 2024
3722978
feat(ui): allow select multiple components (UI mode) - WF-148
madeindjs Dec 19, 2024
6c5511b
feat(ui): customize the action bar in muli-select mode - WF-148
madeindjs Dec 19, 2024
8703821
feat(ui): handle bulk delete in one transaction - WF-148
madeindjs Dec 19, 2024
d737e7b
feat(ui): unselect multiselection on click - WF-148
madeindjs Dec 19, 2024
2ccf662
chore(ui): refactor selection logic - WF-148
madeindjs Dec 20, 2024
f478b11
feat(ui): enable multiples move in workflow - WF-148
madeindjs Dec 20, 2024
1bb4682
fix(ui): fix unit test - WF-148
madeindjs Dec 20, 2024
c969e90
chore(ui): remove old builder manager function
madeindjs Dec 20, 2024
0e48095
fix(ui): fix E2E tests
madeindjs Dec 20, 2024
ea00cd8
New instructional graphics
AccordionGuy Dec 20, 2024
a1c78a3
test(e2e): add tests about multiple selection
madeindjs Dec 20, 2024
7b7e23e
chore(ui): last cleanup - WF-148
madeindjs Dec 20, 2024
a668656
Full update to Builder Basics text and graphics
AccordionGuy Dec 23, 2024
0dddf0c
fix e2e
madeindjs Dec 23, 2024
6819f65
fix(ui): avoid multiple drag and drop in ui - WF-148
madeindjs Dec 23, 2024
d3d856c
Update "Framework" to "Writer Framework"
AccordionGuy Dec 23, 2024
ddfae0b
feat(ui): use CSS layer to let user customize app - WF-57
madeindjs Dec 24, 2024
4d83f25
fix(ui): floating insertion marker overflow - WF-158
madeindjs Dec 24, 2024
02e3ef0
feat(ui): display tooltip only if the element overflow
madeindjs Dec 26, 2024
2947c52
feat(ui): add interminate state for `CoreProgressBar` - WF-152
madeindjs Dec 26, 2024
ea8ae6c
feat: `Tools` resource for AI module
mmikita95 Dec 12, 2024
9db0a0d
fix: test import lint
mmikita95 Dec 27, 2024
3d53c9c
fix(ui): avoid bundling `injectionKeys` in custom components
madeindjs Jan 3, 2025
846e655
Merge branch 'dev' into dataframe-docs-update
FabienArcellier Jan 3, 2025
7b34e51
Merge pull request #693 from AccordionGuy/dataframe-docs-update
FabienArcellier Jan 3, 2025
d6fb5ec
fix(ui): harmonize `injectionKeys` imports
madeindjs Jan 6, 2025
a50852c
Merge pull request #718 from madeindjs/fix-custom-element
ramedina86 Jan 7, 2025
4b9924b
Merge pull request #716 from mmikita95/feat-ai-tools
ramedina86 Jan 7, 2025
54623ff
Merge pull request #704 from madeindjs/WF-85
ramedina86 Jan 7, 2025
f9c960e
Merge pull request #710 from madeindjs/WF-57
ramedina86 Jan 7, 2025
ada9bec
Merge pull request #706 from madeindjs/fix-select-overflow
ramedina86 Jan 7, 2025
0a22dea
Merge pull request #708 from AccordionGuy/builder-basics-update
ramedina86 Jan 7, 2025
67ff382
Merge pull request #702 from madeindjs/WF-132
ramedina86 Jan 7, 2025
e8b8954
Merge pull request #713 from madeindjs/WF-152
ramedina86 Jan 7, 2025
dc8618b
Merge pull request #707 from madeindjs/WF-148
ramedina86 Jan 7, 2025
b468c1f
test(ui): add functionnal test - WF-125
madeindjs Dec 24, 2024
4822f5d
fix(ui): avoid reseting the "selected" state on all field change - WF…
madeindjs Dec 26, 2024
db2b440
Merge pull request #714 from madeindjs/WF-155
ramedina86 Jan 7, 2025
262a521
Merge pull request #712 from madeindjs/WF-125
ramedina86 Jan 7, 2025
4b7a5d8
fix(ui): hide `CoreProgressBar` progression in indeterminate state
madeindjs Jan 8, 2025
526bdaa
chore(ui): improve icon fetching. WF-141
madeindjs Dec 23, 2024
76cbde7
feat(ui): introduce fields validation - WF-140
madeindjs Dec 27, 2024
9a8b8d7
docs: update UI core index reference
emmanuel-ferdman Jan 8, 2025
b9dd14d
Merge pull request #709 from madeindjs/WF-141
ramedina86 Jan 8, 2025
4a1dbe3
Merge pull request #723 from emmanuel-ferdman/dev
ramedina86 Jan 8, 2025
578a6bb
Merge pull request #711 from madeindjs/WF-158
ramedina86 Jan 8, 2025
1dc2a05
Merge pull request #722 from madeindjs/fix-progress-label
ramedina86 Jan 8, 2025
8a78352
fix(ui): prevent `CoreHtml` issue with invlid attributes
madeindjs Jan 8, 2025
6c979c9
fix: update playwright to support ubuntu 24.04
FabienArcellier Jan 17, 2025
ef7030d
Merge pull request #728 from FabienArcellier/fix/update-playwright-to…
FabienArcellier Jan 17, 2025
c69a5cf
feat: enable python 3.13
FabienArcellier Jan 3, 2025
886a41e
feat: enable python 3.13
FabienArcellier Jan 3, 2025
467fe31
feat: enable python 3.13
FabienArcellier Jan 17, 2025
8b86174
feat(ui): support inline markdown in `AnnotatedText` - WF-169
madeindjs Jan 24, 2025
a7ed96d
Revert "feat(ui): support inline markdown in `AnnotatedText` - WF-169"
madeindjs Jan 27, 2025
a9c0442
feat(ui): add `useMarkown` to `CoreAnnotatedText` - WF-169
madeindjs Jan 27, 2025
a2e2747
Merge pull request #731 from madeindjs/WF-169
ramedina86 Jan 29, 2025
373bb58
hotfix: tool calls
mmikita95 Jan 30, 2025
7de351f
Merge pull request #720 from FabienArcellier/enable-python-3-13
ramedina86 Feb 3, 2025
4be4fcf
chore: add support for `required`
mmikita95 Feb 3, 2025
e2ebae4
Merge branch 'dev' into hotfix-tool-calls
mmikita95 Feb 3, 2025
6093c75
fix: types
mmikita95 Feb 3, 2025
1585631
fix: test import after merge
mmikita95 Feb 3, 2025
dfda268
fix: tool calls tests reintroduction
mmikita95 Feb 6, 2025
542b897
Merge pull request #719 from madeindjs/WF-140
ramedina86 Feb 6, 2025
315296e
feat: implement multi-file code editor - WF-100
madeindjs Jan 7, 2025
18111c1
fix(ui): handle scroll in multifile editor - WF-100
madeindjs Jan 30, 2025
59ea251
feat(ui): implement directory delete in multifile editor - WF-176
madeindjs Jan 31, 2025
7fc2ed2
fix(ui): remove HTML popover usage - WF-100
madeindjs Feb 3, 2025
eca16ea
fix(backend): use `os.walk` instead of `glob` for source files - WF-100
madeindjs Feb 3, 2025
420303d
fix(ui): introduce horizontal scroll in component tree - WF166
madeindjs Jan 23, 2025
a6620f1
Merge pull request #724 from madeindjs/WF-100
ramedina86 Feb 7, 2025
6cbe18c
Merge pull request #733 from mmikita95/hotfix-tool-calls
ramedina86 Feb 10, 2025
2c1c965
chore: Bump rc version
ramedina86 Feb 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: macos-latest-large
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Pull requests should be done on the `dev` branch. When the release is finalised,

Whether you're interested in contributing to the repository, creating a fork, or just improving your understanding of Writer Framework, these are the suggested steps for setting up a development environment.

- You can install the package in editable mode using `poetry install`
- You can install the package in editable mode using `poetry install --with build`
- Enable the virtual environment with `poetry shell`
- Install all the dev dependencies with `alfred install.dev`
- Run Writer Framework on port 5000. For example, `writer edit apps/hello --port 5000`.
4 changes: 2 additions & 2 deletions alfred/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
def install_dev():
alfred.run("poetry install --with build")
alfred.run("npm ci")
alfred.invoke_command("npm.codegen")
alfred.run("npm run build")

@alfred.command("install.ci", help="install ci dependencies and generate code", hidden=True)
def install_ci():
alfred.run("npm ci")
alfred.invoke_command("npm.codegen")
alfred.run("npm run build")
83 changes: 82 additions & 1 deletion docs/framework/ai-module.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Function tools require the following properties:

When a conversation involves a tool (either a graph or a function), Framework automatically handles the requests from LLM to use the tools during interactions. If the tool needs multiple steps (for example, querying data and processing it), Framework will handle those steps recursively, calling functions as needed until the final result is returned.

By default, to prevent endless recursion, Framework will only handle 3 consecutive tool calls. You can expand it in case it doesn't suit your case – both `complete()` and `stream_complete()` accept a `max_tool_depth` parameter, which configures the maximum allowed recursion depth:
By default, to prevent endless recursion, Framework will only handle 5 consecutive tool calls. You can expand it in case it doesn't suit your case – both `complete()` and `stream_complete()` accept a `max_tool_depth` parameter, which configures the maximum allowed recursion depth:

```python
response = conversation.complete(tools=tool, max_tool_depth=7)
Expand Down Expand Up @@ -340,3 +340,84 @@ for chunk in stream_ask(
```
</CodeGroup>

## Using the `Tools` class

<Note>
This document outlines the use of `Tools` in the Writer Framework; for more thorough documentation, check out (this guide)[https://dev.writer.com/api-guides/tools].
</Note>

The `writer.ai.tools` instance provides access to Writer SDK `tools` resources, such as text splitting, medical content comprehension, and PDF parsing. Below is a guide on how to use each method.

### Splitting Content

The `split` method divides text into chunks based on a selected strategy.

```python
from writer.ai import tools

content = \
"""
This is a long piece of text that needs to be split into smaller parts.
Lorem ipsum dolor sit amet...
"""
chunks = tools.split(content, strategy="llm_split")
print(chunks)
```

**Parameters**:
- `content` (str): The text to be split.
- `strategy` (str): The splitting strategy (`llm_split`, `fast_split`, or `hybrid_split`).

**Returns**:
A list of text chunks.

### Medical Content Comprehension

The `comprehend_medical` method processes medical text and extracts relevant entities based on a specified response type.

```python
from writer.ai import tools

medical_text = "Patient shows symptoms of hypertension and diabetes."
entities = tools.comprehend_medical(medical_text, response_type="Entities")
print(entities)
```

**Parameters**:
- `content` (str): The medical text to process.
- `response_type` (str): The type of medical response (`Entities`, `RxNorm`, `ICD-10-CM`, or `SNOMED CT`).

**Returns**:
A list of extracted medical entities.

### PDF Parsing

The `parse_pdf` method extracts text content from a PDF file. The file can be referenced by its ID, or provided as a `File` object.

<CodeGroup>
```python file_id
from writer.ai import tools

file_id = "example-file-id"
parsed_content = tools.parse_pdf(file_id, format="text")
print(parsed_content)
```
```python upload_file
from writer.ai import tools

file_object = upload_file(
data=pdf_content,
type="application/pdf",
name="uploaded_file.pdf"
)
parsed_content = tools.parse_pdf(file_object, format="text")
print(parsed_content)
```
</CodeGroup>

**Parameters**:
- `file_id_or_file` (str or File): The file to parse (by ID or as an object).
- `format` (str): The format of the extracted content (`text` or `markdown`).

**Returns**:
The text content of the PDF.
Loading
Loading