An open API service indexing awesome lists of open source software.

https://github.com/answerdotai/contextpack


https://github.com/answerdotai/contextpack

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# contextpack

## Usage

### Installation

Install latest from the GitHub
[repository](https://github.com/AnswerDotAI/contextpack):

``` sh
$ pip install contextpack
```

## How to use

``` python
from contextpack import *
```

TLDR: if you want to get llm-friendly context on the FastHTML library,
do this:

``` python
fh_llm = ctx_fasthtml.fasthtml_llms_ctx.get()
fh_llm[:100]
```

'Things to remember when writing FastHTML apps: \\- Although parts of its API are inspired by FastAPI,'

In short, this is how you use it:

1. From contextpack.core import \*
2. Use `ctx_` to see all available topics and pick one
3. Use `.` to see all subtopics, which are the contexts you might
choose
4. Add `.get()` to pull the context itself

For example:

``` python
ctx_fastlite_sqlutils
```

doc: LLM contexts on fastlite-sqlutils
sub-topics: ['fastlite_core', 'fastlite_index', 'sqlite_utils_docs']

``` python
fc_llm = ctx_fastlite_sqlutils.fastlite_core.get()
fc_llm[:100]
```

'# Source ## Metadata ``` python from IPython.display import Markdown from fastcore.test import test'

You can also learn a little about topics and subtopics from their repr:

``` python
ctx_fastlite_sqlutils
```

doc: LLM contexts on fastlite-sqlutils
sub-topics: ['fastlite_core', 'fastlite_index', 'sqlite_utils_docs']

You can also learn a little about topics and subtopics from their repr:

``` python
ctx_fastlite_sqlutils.fastlite_core
```

URL: https://answerdotai.github.io/fastlite/core.html.md