Skip to main content

Using only one line of commmands to evaluate multiple models

Project description

OneAPI

Use a single line of code to call multiple model APIs similar to ChatGPT. Currently supported: Azure OpenAI Resource endpoint API, OpenAI Official API, and Anthropic Claude series model API.

Installation

pip install -U one-eval

Usage

1. Set up your API information in the local configuration file.

OpenAI config:

{
    "api_key": "YOUR_API_KEY",
    "api": "https://api.openai.com/v1",
    "api_type": "open_ai"
}

Azure OpenAI config:

{
    "api_key": "YOUR_API_KEY",
    "api": "Replace with your Azure OpenAI resource's endpoint value.",
    "api_type": "azure"
}

Anthropic config:

{
    "api_key": "YOUR_API_KEY",
    "api": "https://api.anthropic.com",
    "api_type": "claude"
}

api_key: Obtain your OpenAI API key from the OpenAI website and your Claude API key from the Anthropic website.

api: The base API used to send requests. You may also specify a proxy URL like: "https://your_proxy_domain/v1". For Azure APIs, you can find relevant information on the Azure resource dashboard. The API format is usually: https://{your_organization}.openai.azure.com/.

api_type: Currently supported values are "open_ai", "azure", or "claude".

2. Use with command lines

Evaluate one sample

one-eval-line --config_file CHANGE_TO_YOUR_CONFIG_PATH \
--model gpt-3.5-turbo \
--prompt "Janet’s ducks lay 16 eggs per day. She eats three for breakfast every morning and bakes muffins for her friends every day with four. She sells the remainder at the farmers' market daily for $2 per fresh duck egg. How much in dollars does she make every day at the farmers' market?" \
--answers 20 100 21 18 \
--target 18

Evaluate one file

one-eval-file --config_file CHANGE_TO_YOUR_CONFIG_PATH \
--eval_data_path   \
--output_path  \
--model gpt-3.5-turbo \
--verbose True
--

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

one-eval-0.1.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

one_eval-0.1.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file one-eval-0.1.2.tar.gz.

File metadata

  • Download URL: one-eval-0.1.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for one-eval-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4c73e5f843c0efb9d381e96094106f9d13e837ee788f8650e4935e37f82d166e
MD5 b9ae8a751891f046cc04ad61e2e0c691
BLAKE2b-256 e347f2b3190a8af9869f70f177abe83507819b5b29014deaf1c967078438599e

See more details on using hashes here.

File details

Details for the file one_eval-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: one_eval-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for one_eval-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d62b0997d464a3fab502874751480fc100b5756c9602de769289403959a85065
MD5 9b88309582e61d4dc0cc9dd3ec0c0b3f
BLAKE2b-256 55224de9618c4aa9fae59078f9c266d53d20a630810b299f3f8def5812cd07a2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page