Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Feb 8, 2024
1 parent ae21e73 commit 8d9a2fc
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
# convertanything
# convertanything

`convertanything` is a simple way to convert any unstructured texts into pydantic models in Python with the use of language models. See the [examples notebook](examples.ipynb) for more details.

## Installation

```bash
pip install convertanything
```

## Usage

```python
from convertanything import convertanything
from pydantic import BaseModel
from typing import List

class Person(BaseModel):
name: str
age: int
email: str
interests: List[str]

response = await convertanything(
input_string="Hi my name is John Doe, I am 30 years old, my email is [email protected] . I like to go fishing.",
model=Person,
api_key="Your OpenAI API Key",
)
print(response)
```

0 comments on commit 8d9a2fc

Please sign in to comment.