Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
improvements to the Universal API page.
Browse files Browse the repository at this point in the history
  • Loading branch information
djl11 committed Jul 30, 2024
1 parent d502f91 commit 3390494
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
36 changes: 17 additions & 19 deletions docs/concepts/unify_api.rst
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
Universal API
==============

There’s a sea of models and providers, with new LLMs coming out all the time.
Each provider has its own API keys, account balance, and subtle nuances in how the models are queried.
There’s an ever expanding ocean of models and providers, with new LLMs coming out all the time 🌊
Each provider requires a unique API key, unique payment processing system, and unique format for querying the API.
When testing out different models and providers, it can quickly become very cumbersome to manage all of these nuances 🫠

The Unify Universal API provides:
Our Universal API provides:

- A single, common interface for all models and providers
- One account, with one balance and one API key
- A single, common interface for all models and providers 🟢
- One account, with one balance and one API key 🔑

You can interact with the API through a HTTP request from any programming language, through our own Unify Python package, or through the OpenAI Python package.

Authentication
--------------
You need an API key to query the API. `Sign up for an account <https://console.unify.ai/login>`_, and get your API key from the `console <https://console.unify.ai/>`_.
To get your universal API key, simply `sign up<https://console.unify.ai>`_!

Querying the API
----------------
There are three ways to query the API:

- HTTP request
- Unify Python package
- OpenAI Python package
You can interact with the API via:

- `HTTP Requests`_ from any programming language
- Our own `Unify Python Package`_
- The `OpenAI Python Package`_
- The `OpenAI NodeJS Package`_

HTTP Request
^^^^^^^^^^^^
Run the following command in a terminal (replacing :code:`$UNIFY_API_KEY` with your own).
HTTP Requests
^^^^^^^^^^^^^
Run the following command in a terminal (replacing :code:`$UNIFY_KEY` with your own).

.. code-block::
curl -X 'POST' \
'https://api.unify.ai/v0/chat/completions' \
-H 'Authorization: Bearer $UNIFY_API_KEY' \
-H 'Authorization: Bearer $UNIFY_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "llama-3-8b-chat@fireworks-ai",
Expand Down Expand Up @@ -103,7 +101,7 @@ Sample inference
.. code-block:: python
from unify import Unify
client = Unify("llama-3-8b-chat@fireworks-ai", api_key="$UNIFY_API_KEY")
client = Unify("llama-3-8b-chat@fireworks-ai", api_key="$UNIFY_KEY")
response = client.generate("Say hi.")
OpenAI Python Package
Expand Down
4 changes: 2 additions & 2 deletions docs/home/home.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Welcome to Unify!
We're on a mission to unify and simplify the LLM landscape. Unify lets you:

* **🔑 Use any LLM from any Provider**: With a single interface, you can use all LLMs from all providers by simply changing one string. No need to manage several API keys or handle different input-output formats. Unify handles all of that for you!

|
* **📊 Improve LLM Performance**: Add your own custom tests and evals, and benchmark your own prompts on all models and providers. Comparing quality, cost and speed, and iterate on your system prompt until all test cases pass, and you can deploy your app!

|
* **🔀 Route to the Best LLM**: Improve quality, cost and speed by routing to the perfect model and provider for each individual prompt.

Quick Start
Expand Down
3 changes: 0 additions & 3 deletions docs/partial_conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from typing import List
import os

# Retrieve html_theme_options from docs/conf.py
from docs.conf import html_theme_options, extensions, html_static_path
Expand All @@ -13,8 +12,6 @@
# Add any paths that contain custom static files (such as style sheets) here, relative to this directory.
html_static_path.append('./demos/demos/videos/')



project = "Unify"
html_title = "Unify Documentation"

Expand Down
Empty file modified docs/prebuild.sh
100644 → 100755
Empty file.

0 comments on commit 3390494

Please sign in to comment.