https://github.com/chainlit/literalai-python
https://github.com/chainlit/literalai-python
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/chainlit/literalai-python
- Owner: Chainlit
- License: apache-2.0
- Created: 2023-11-07T16:31:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-07T12:26:54.000Z (over 1 year ago)
- Last Synced: 2024-11-07T12:33:56.358Z (over 1 year ago)
- Language: Python
- Homepage: https://docs.getliteral.ai/
- Size: 546 KB
- Stars: 12
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Literal AI client
## Installation
```bash
pip install literalai
```
## Usage
The full documentation is available [here](https://docs.getliteral.ai/python-client).
Create a `.env` file with the `LITERAL_API_KEY` environment variable set to your API key.
```python
from literalai import LiteralClient
from dotenv import load_dotenv
load_dotenv()
literalai_client = LiteralClient()
@literalai_client.step(type="run")
def my_step(input):
return f"World"
@literalai_client.thread
def main():
print(my_step("Hello"))
main()
client.flush_and_stop()
print("Done")
```
## Development setup
```bash
pip install -r requirements-dev.txt
```