Skip to content

Commit

Permalink
Added pandas conversion support
Browse files Browse the repository at this point in the history
Some small code fixes for stability
Added UUIDs to messages
  • Loading branch information
monoxgas committed May 12, 2024
1 parent b2006fe commit 459392a
Show file tree
Hide file tree
Showing 11 changed files with 468 additions and 54 deletions.
1 change: 1 addition & 0 deletions docs/api/data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: rigging.data
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ chat = generator.chat([

# We can fork before generation has occured
specific = chat.fork("Be specific please.").run()
poetic = chat.fork("Be as poetic as possible").overload(temperature=1.5).run() # (1)!
poetic = chat.fork("Be as poetic as possible").with_(temperature=1.5).run() # (1)!

# We can also continue after generation
next_chat = poetic.continue_(
Expand Down
12 changes: 12 additions & 0 deletions docs/topics/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,18 @@ Our general guide is that LLMs tend to work better with elements over attributes
</person>
```

## XML Examples

For primitive models, using the default [`.xml_tags()`][rigging.model.Model.xml_tags] or [`.xml_example()`][rigging.model.Model.xml_example]
works well for communicating to the model how it should respond, however for more complex models it's **highly recommended** to overload
the [`.xml_example()`][rigging.model.Model.xml_example] method to provide a more detailed example of the XML structure you expect.

The easiest way to approach this overload is to instantiate your model class with some standard values
and use [`.to_prety_xml()`][rigging.model.Model.to_pretty_xml]


```py


## Complex Models

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ nav:
- rigging.model: api/model.md
- rigging.message: api/message.md
- rigging.tool: api/tool.md
- rigging.data: api/data.md
- rigging.parsing: api/parsing.md
- rigging.logging: api/logging.md
- rigging.error: api/error.md
Expand Down
168 changes: 167 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ pydantic = "2.5.3"
pydantic-xml = "2.7.0"
loguru = "^0.7.2"
litellm = "1.35.21"
pandas = "^2.2.2"

[tool.poetry.group.dev.dependencies]
ipykernel = "^6.27.1"
mypy = "^1.8.0"
ruff = "^0.1.14"
pytest = "^8.0.0"
pandas = "^2.2.2"
pandas-stubs = "^2.2.1.240316"

[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6.0"
Expand Down
Loading

0 comments on commit 459392a

Please sign in to comment.