Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Pollak committed Aug 4, 2024
1 parent b31e235 commit d892cce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ model

'claude-3-haiku-20240307'

### Simple Model

``` python
class Pet(BaseModel):
"Create a new pet"
Expand All @@ -56,9 +54,9 @@ print(repr(c.struct(msgs="Tom: my cat is juma and he's 16 years old", resp_model
Pet(name='Mac', age=14, owner='NA', type='dog')
Pet(name='juma', age=16, owner='Tom', type='cat')

### Chat & Unions
## Going Deeper

We can go way deeper, for example this one I pulled from [pydantic
I pulled this example from [pydantic
docs](https://docs.pydantic.dev/latest/concepts/unions/#discriminated-unions)
has a list of discriminated unions, shown by `pet_type`. For each object
the model is required to return different things.
Expand Down Expand Up @@ -168,7 +166,7 @@ print(repr(c.struct(msgs=["Can you create me a new user for tom age 22"], resp_m

Uses the few-shot example as asked for in the system prompt.

You can find more examples [nbs/examples](nbs/examples)
### You can find more examples [nbs/examples](nbs/examples)

## Signature:

Expand Down
13 changes: 3 additions & 10 deletions nbs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@
"model"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Simple Model"
]
},
{
"cell_type": "code",
"execution_count": 4,
Expand Down Expand Up @@ -121,14 +114,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Chat & Unions"
"## Going Deeper"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can go way deeper, for example this one I pulled from [pydantic docs](https://docs.pydantic.dev/latest/concepts/unions/#discriminated-unions) has a list of discriminated unions, shown by `pet_type`. For each object the model is required to return different things.\n",
"I pulled this example from [pydantic docs](https://docs.pydantic.dev/latest/concepts/unions/#discriminated-unions) has a list of discriminated unions, shown by `pet_type`. For each object the model is required to return different things.\n",
"\n",
"You should be able to use the full power of Pydantic here. I've found that instructor for Claude fails on this example.\n",
"\n",
Expand Down Expand Up @@ -315,7 +308,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You can find more examples [nbs/examples](nbs/examples)"
"### You can find more examples [nbs/examples](nbs/examples)"
]
},
{
Expand Down

0 comments on commit d892cce

Please sign in to comment.