-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
480 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,29 +58,29 @@ jobs: | |
- name: Upload coverage report | ||
uses: codecov/[email protected] | ||
|
||
# dist: | ||
# name: Distribution build | ||
# runs-on: ubuntu-latest | ||
# needs: [pre-commit] | ||
|
||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
|
||
# - name: Build sdist and wheel | ||
# run: pipx run build | ||
|
||
# - uses: actions/upload-artifact@v4 | ||
# with: | ||
# path: dist | ||
|
||
# - name: Check products | ||
# run: pipx run twine check dist/* | ||
|
||
# - uses: pypa/[email protected] | ||
# if: github.event_name == 'release' && github.event.action == 'published' | ||
# with: | ||
# # Remember to generate this and set it in "GitHub Secrets" | ||
# user: __token__ | ||
# password: ${{ secrets.PYPI_API_TOKEN }} | ||
docs: | ||
needs: [pre-commit, pytest] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Apply mkdocs cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- name: Install doc dependencies via poetry | ||
run: | | ||
pip install poetry | ||
poetry install --with dev | ||
- name: Build docs with gh-deploy --force | ||
run: | | ||
poetry run mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# About | ||
|
||
`prompto` is a Python library written by the [Research Engineering Team (REG)](https://www.turing.ac.uk/work-turing/research/research-engineering-group) at the [Alan Turing Institute](https://www.turing.ac.uk/). It was originally written by [Ryan Chan](https://github.com/rchan26), [Federico Nanni](https://github.com/fedenanni) and [Evelina Gabasova](https://github.com/evelinag). | ||
|
||
The library is designed to facilitate the running of language model experiments stored as jsonl files. It automates querying API endpoints and logs progress asynchronously. The library is designed to be extensible and can be used to query different models. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
# Instructions to add new API/model | ||
|
||
The `prompto` library supports querying multiple LLM API endpoints asynchronously (see [available APIs](./../README.md#available-apis-and-models) and the [model docs](./models.md)). However, the list of available APIs is far from complete! As we don't have access to every API available, we need your help to implement them and welcome contributions to the library! It might also be the case that an API has been implemented, but perhaps it needs to updated or improved. | ||
|
||
In this document, we aim to capture some key steps to add a new API/model to the library. We hope that this will develop into a helpful guide. | ||
|
||
For a guide to contributing to the library in general, see our [contribution guide](./contribution.md). If you have any suggestions or corrections, please feel free to contribute! | ||
|
||
## The `prompto` library structure | ||
|
||
## Asynchronous querying | ||
|
||
## The `AsyncBaseAPI` class | ||
|
||
## Implementing 'checks' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## Azure OpenAI | ||
|
||
**Environment variables**: | ||
|
||
* `AZURE_OPENAI_API_KEY`: the API key for the Azure OpenAI API | ||
* `AZURE_OPENAI_API_ENDPOINT`: the endpoint for the Azure OpenAI API | ||
* `AZURE_OPENAI_API_VERSION`: the version of the Azure OpenAI API | ||
|
||
**Model-specific environment variables**: | ||
|
||
As described in the [model-specific environment variables](./environment_variables.md#model-specific-environment-variables) section, you can set model-specific environment variables for different models in Azure OpenAI by appending the model name to the environment variable name. For example, if `"model_name": "prompto_model"` is specified in the `prompt_dict`, the following model-specific environment variables can be used: | ||
|
||
* `AZURE_OPENAI_API_KEY_prompto_model` | ||
* `AZURE_OPENAI_API_ENDPOINT_prompto_model` | ||
* `AZURE_OPENAI_API_VERSION_prompto_model` | ||
|
||
**Required environment variables**: | ||
|
||
For any given `prompt_dict`, the following environment variables are required: | ||
|
||
* One of `AZURE_OPENAI_API_KEY` or `AZURE_OPENAI_API_KEY_model_name` | ||
* One of `AZURE_OPENAI_API_ENDPOINT` or `AZURE_OPENAI_API_ENDPOINT_model_name` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.