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.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: one-eval-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 5f0e64279a3d00aa2865ac83505870d30c957c7552ea2e830a4ccd5c9eb3a8f5
MD5 8d6d566cbcea9146e3936653c5118fc6
BLAKE2b-256 b1833c1275fb3f13757038167cfb3facfaa087b5dd5e8d68ddd6f9456d55e978

See more details on using hashes here.

File details

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

File metadata

  • Download URL: one_eval-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86b82dd01943e4f70bcb28c9913b48eb8544adda7373d515b4e7206bfa1c149b
MD5 d4355c86242b4635add8e145a406ea00
BLAKE2b-256 67750645468a722bbf93682f22c82b7505c780593a1154f607d4ef26214a1a1f

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