From fcb19af842810c4c87f56c72bb658ed1d800f300 Mon Sep 17 00:00:00 2001 From: Vince Lwt Date: Mon, 21 Aug 2023 11:59:02 +0200 Subject: [PATCH 001/174] add llmonitor to docs --- docs/my-website/docs/index.md | 28 +++++++++----- .../docs/observability/callbacks.md | 20 +++++----- .../observability/llmonitor_integration.md | 38 +++++++++++++++++++ 3 files changed, 68 insertions(+), 18 deletions(-) create mode 100644 docs/my-website/docs/observability/llmonitor_integration.md diff --git a/docs/my-website/docs/index.md b/docs/my-website/docs/index.md index 4ca47033568..8fbce1e29de 100644 --- a/docs/my-website/docs/index.md +++ b/docs/my-website/docs/index.md @@ -1,23 +1,30 @@ # 🚅 litellm -a light 100 line package to simplify calling OpenAI, Azure, Cohere, Anthropic APIs + +a light 100 line package to simplify calling OpenAI, Azure, Cohere, Anthropic APIs ###### litellm manages: -* Calling all LLM APIs using the OpenAI format - `completion(model, messages)` -* Consistent output for all LLM APIs, text responses will always be available at `['choices'][0]['message']['content']` -* Consistent Exceptions for all LLM APIs, we map RateLimit, Context Window, and Authentication Error exceptions across all providers to their OpenAI equivalents. [see Code](https://github.com/BerriAI/litellm/blob/ba1079ff6698ef238c5c7f771dd2b698ec76f8d9/litellm/utils.py#L250) + +- Calling all LLM APIs using the OpenAI format - `completion(model, messages)` +- Consistent output for all LLM APIs, text responses will always be available at `['choices'][0]['message']['content']` +- Consistent Exceptions for all LLM APIs, we map RateLimit, Context Window, and Authentication Error exceptions across all providers to their OpenAI equivalents. [see Code](https://github.com/BerriAI/litellm/blob/ba1079ff6698ef238c5c7f771dd2b698ec76f8d9/litellm/utils.py#L250) ###### observability: -* Logging - see exactly what the raw model request/response is by plugging in your own function `completion(.., logger_fn=your_logging_fn)` and/or print statements from the package `litellm.set_verbose=True` -* Callbacks - automatically send your data to Helicone, Sentry, Posthog, Slack - `litellm.success_callbacks`, `litellm.failure_callbacks` [see Callbacks](https://litellm.readthedocs.io/en/latest/advanced/) + +- Logging - see exactly what the raw model request/response is by plugging in your own function `completion(.., logger_fn=your_logging_fn)` and/or print statements from the package `litellm.set_verbose=True` +- Callbacks - automatically send your data to Helicone, LLMonitor, Sentry, Posthog, Slack - `litellm.success_callbacks`, `litellm.failure_callbacks` [see Callbacks](https://litellm.readthedocs.io/en/latest/advanced/) ## Quick Start + Go directly to code: [Getting Started Notebook](https://colab.research.google.com/drive/1gR3pY-JzDZahzpVdbGBtrNGDBmzUNJaJ?usp=sharing) + ### Installation + ``` pip install litellm ``` ### Usage + ```python from litellm import completion @@ -33,11 +40,14 @@ response = completion(model="gpt-3.5-turbo", messages=messages) # cohere call response = completion("command-nightly", messages) ``` + Need Help / Support : [see troubleshooting](https://litellm.readthedocs.io/en/latest/troubleshoot) -## Why did we build liteLLM +## Why did we build liteLLM + - **Need for simplicity**: Our code started to get extremely complicated managing & translating calls between Azure, OpenAI, Cohere ## Support -* [Meet with us 👋](https://calendly.com/d/4mp-gd3-k5k/berriai-1-1-onboarding-litellm-hosted-version) -* Contact us at ishaan@berri.ai / krrish@berri.ai + +- [Meet with us 👋](https://calendly.com/d/4mp-gd3-k5k/berriai-1-1-onboarding-litellm-hosted-version) +- Contact us at ishaan@berri.ai / krrish@berri.ai diff --git a/docs/my-website/docs/observability/callbacks.md b/docs/my-website/docs/observability/callbacks.md index 7ac67b30df4..74641f147c0 100644 --- a/docs/my-website/docs/observability/callbacks.md +++ b/docs/my-website/docs/observability/callbacks.md @@ -1,29 +1,31 @@ # Callbacks ## Use Callbacks to send Output Data to Posthog, Sentry etc -liteLLM provides `success_callbacks` and `failure_callbacks`, making it easy for you to send data to a particular provider depending on the status of your responses. -liteLLM supports: +liteLLM provides `success_callbacks` and `failure_callbacks`, making it easy for you to send data to a particular provider depending on the status of your responses. + +liteLLM supports: - [Helicone](https://docs.helicone.ai/introduction) -- [Sentry](https://docs.sentry.io/platforms/python/) +- [LLMonitor](https://llmonitor.com/docs) +- [Sentry](https://docs.sentry.io/platforms/python/) - [PostHog](https://posthog.com/docs/libraries/python) - [Slack](https://slack.dev/bolt-python/concepts) ### Quick Start + ```python from litellm import completion # set callbacks -litellm.success_callback=["posthog", "helicone"] -litellm.failure_callback=["sentry"] +litellm.success_callback=["posthog", "helicone", "llmonitor"] +litellm.failure_callback=["sentry", "llmonitor"] ## set env variables os.environ['SENTRY_API_URL'], os.environ['SENTRY_API_TRACE_RATE']= "" os.environ['POSTHOG_API_KEY'], os.environ['POSTHOG_API_URL'] = "api-key", "api-url" -os.environ["HELICONE_API_KEY"] = "" +os.environ["HELICONE_API_KEY"] = "" +os.environ["LLMONITOR_APP_ID"] = "" -response = completion(model="gpt-3.5-turbo", messages=messages) +response = completion(model="gpt-3.5-turbo", messages=messages) ``` - - diff --git a/docs/my-website/docs/observability/llmonitor_integration.md b/docs/my-website/docs/observability/llmonitor_integration.md new file mode 100644 index 00000000000..f263050440d --- /dev/null +++ b/docs/my-website/docs/observability/llmonitor_integration.md @@ -0,0 +1,38 @@ +# LLMonitor Tutorial + +[LLMonitor](https://llmonitor.com/) is an open source observability platform that provides cost tracking, user tracking and powerful agent tracing. + +## Use LLMonitor to log requests across all LLM Providers (OpenAI, Azure, Anthropic, Cohere, Replicate, PaLM) + +liteLLM provides `success_callbacks` and `failure_callbacks`, making it easy for you to send data to a particular provider depending on the status of your responses. + +### Using Callbacks + +Use just 2 lines of code, to instantly log your responses **across all providers** with llmonitor: + +``` +litellm.success_callback=["llmonitor"] +litellm.error_callback=["llmonitor"] +``` + +Complete code + +```python +from litellm import completion + +## set env variables +os.environ["LLMONITOR_APP_ID"] = "your-llmonitor-app-id" +# Optional: os.environ["LLMONITOR_API_URL"] = "self-hosting-url" + +os.environ["OPENAI_API_KEY"], os.environ["COHERE_API_KEY"] = "", "" + +# set callbacks +litellm.success_callback=["llmonitor"] +litellm.error_callback=["llmonitor"] + +#openai call +response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}]) + +#cohere call +response = completion(model="command-nightly", messages=[{"role": "user", "content": "Hi 👋 - i'm cohere"}]) +``` From 3e9472ec118526d3678aea0c2595f4541165975f Mon Sep 17 00:00:00 2001 From: Vince Lwt Date: Mon, 21 Aug 2023 12:19:58 +0200 Subject: [PATCH 002/174] add integration files --- .../docs/observability/integrations.md | 17 +++--- litellm/integrations/llmonitor.py | 61 +++++++++++++++++++ litellm/tests/test_llmonitor_integration.py | 28 +++++++++ 3 files changed, 96 insertions(+), 10 deletions(-) create mode 100644 litellm/integrations/llmonitor.py create mode 100644 litellm/tests/test_llmonitor_integration.py diff --git a/docs/my-website/docs/observability/integrations.md b/docs/my-website/docs/observability/integrations.md index 6b6d535befa..ba586247832 100644 --- a/docs/my-website/docs/observability/integrations.md +++ b/docs/my-website/docs/observability/integrations.md @@ -1,12 +1,9 @@ # Logging Integrations -| Integration | Required OS Variables | How to Use with callbacks | -|-----------------|--------------------------------------------|-------------------------------------------| -| Sentry | `SENTRY_API_URL` | `litellm.success_callback=["sentry"]` | -| Posthog | `POSTHOG_API_KEY`,`POSTHOG_API_URL` | `litellm.success_callback=["posthog"]` | -| Slack | `SLACK_API_TOKEN`,`SLACK_API_SECRET`,`SLACK_API_CHANNEL` | `litellm.success_callback=["slack"]` | -| Helicone | `HELICONE_API_TOKEN` | `litellm.success_callback=["helicone"]` | - - - - +| Integration | Required OS Variables | How to Use with callbacks | +| ----------- | -------------------------------------------------------- | ---------------------------------------- | +| LLMonitor | `LLMONITOR_APP_ID` | `litellm.success_callback=["llmonitor"]` | +| Sentry | `SENTRY_API_URL` | `litellm.success_callback=["sentry"]` | +| Posthog | `POSTHOG_API_KEY`,`POSTHOG_API_URL` | `litellm.success_callback=["posthog"]` | +| Slack | `SLACK_API_TOKEN`,`SLACK_API_SECRET`,`SLACK_API_CHANNEL` | `litellm.success_callback=["slack"]` | +| Helicone | `HELICONE_API_TOKEN` | `litellm.success_callback=["helicone"]` | diff --git a/litellm/integrations/llmonitor.py b/litellm/integrations/llmonitor.py new file mode 100644 index 00000000000..e7430b5bb7e --- /dev/null +++ b/litellm/integrations/llmonitor.py @@ -0,0 +1,61 @@ +#### What this does #### +# On success + failure, log events to aispend.io +import datetime +import traceback +import dotenv +import os +import requests +dotenv.load_dotenv() # Loading env variables using dotenv + + +class LLMonitorLogger: + # Class variables or attributes + def __init__(self): + # Instance variables + self.api_url = os.getenv( + "LLMONITOR_API_URL") or "https://app.llmonitor.com" + self.account_id = os.getenv("LLMONITOR_APP_ID") + + def log_event(self, model, messages, response_obj, start_time, end_time, print_verbose): + # Method definition + try: + print_verbose( + f"LLMonitor Logging - Enters logging function for model {model}") + + print(model, messages, response_obj, start_time, end_time) + + # headers = { + # 'Content-Type': 'application/json' + # } + + # prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar = self.price_calculator( + # model, response_obj, start_time, end_time) + # total_cost = prompt_tokens_cost_usd_dollar + completion_tokens_cost_usd_dollar + + # response_time = (end_time-start_time).total_seconds() + # if "response" in response_obj: + # data = [{ + # "response_time": response_time, + # "model_id": response_obj["model"], + # "total_cost": total_cost, + # "messages": messages, + # "response": response_obj['choices'][0]['message']['content'], + # "account_id": self.account_id + # }] + # elif "error" in response_obj: + # data = [{ + # "response_time": response_time, + # "model_id": response_obj["model"], + # "total_cost": total_cost, + # "messages": messages, + # "error": response_obj['error'], + # "account_id": self.account_id + # }] + + # print_verbose(f"BerriSpend Logging - final data object: {data}") + # response = requests.post(url, headers=headers, json=data) + except: + # traceback.print_exc() + print_verbose( + f"LLMonitor Logging Error - {traceback.format_exc()}") + pass diff --git a/litellm/tests/test_llmonitor_integration.py b/litellm/tests/test_llmonitor_integration.py new file mode 100644 index 00000000000..5a4b4beb3b0 --- /dev/null +++ b/litellm/tests/test_llmonitor_integration.py @@ -0,0 +1,28 @@ +#### What this tests #### +# This tests if logging to the helicone integration actually works + +from litellm import embedding, completion +import litellm +import sys +import os +import traceback +import pytest + +# Adds the parent directory to the system path +sys.path.insert(0, os.path.abspath('../..')) + +litellm.success_callback = ["llmonitor"] + +litellm.set_verbose = True + +user_message = "Hello, how are you?" +messages = [{"content": user_message, "role": "user"}] + + +# openai call +response = completion(model="gpt-3.5-turbo", + messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}]) + +# cohere call +# response = completion(model="command-nightly", +# messages=[{"role": "user", "content": "Hi 👋 - i'm cohere"}]) From 3675d3e02911b512f6d5c4f6a68a36fcd35728a1 Mon Sep 17 00:00:00 2001 From: Vince Lwt Date: Mon, 21 Aug 2023 16:26:47 +0200 Subject: [PATCH 003/174] almost working llmonitor --- cookbook/proxy-server/readme.md | 112 ++--- litellm/integrations/llmonitor.py | 52 +-- litellm/tests/test_llmonitor_integration.py | 38 +- litellm/utils.py | 437 ++++++++++++-------- proxy-server/readme.md | 112 ++--- 5 files changed, 425 insertions(+), 326 deletions(-) diff --git a/cookbook/proxy-server/readme.md b/cookbook/proxy-server/readme.md index 4f735f38c65..bb9e00804b2 100644 --- a/cookbook/proxy-server/readme.md +++ b/cookbook/proxy-server/readme.md @@ -1,6 +1,7 @@ - # liteLLM Proxy Server: 50+ LLM Models, Error Handling, Caching + ### Azure, Llama2, OpenAI, Claude, Hugging Face, Replicate Models + [![PyPI Version](https://img.shields.io/pypi/v/litellm.svg)](https://pypi.org/project/litellm/) [![PyPI Version](https://img.shields.io/badge/stable%20version-v0.1.345-blue?color=green&link=https://pypi.org/project/litellm/0.1.1/)](https://pypi.org/project/litellm/0.1.1/) ![Downloads](https://img.shields.io/pypi/dm/litellm) @@ -11,34 +12,36 @@ ![4BC6491E-86D0-4833-B061-9F54524B2579](https://github.com/BerriAI/litellm/assets/17561003/f5dd237b-db5e-42e1-b1ac-f05683b1d724) ## What does liteLLM proxy do + - Make `/chat/completions` requests for 50+ LLM models **Azure, OpenAI, Replicate, Anthropic, Hugging Face** - + Example: for `model` use `claude-2`, `gpt-3.5`, `gpt-4`, `command-nightly`, `stabilityai/stablecode-completion-alpha-3b-4k` + ```json { "model": "replicate/llama-2-70b-chat:2c1608e18606fad2812020dc541930f2d0495ce32eee50074220b87300bc16e1", "messages": [ - { - "content": "Hello, whats the weather in San Francisco??", - "role": "user" - } - ] + { + "content": "Hello, whats the weather in San Francisco??", + "role": "user" + } + ] } ``` -- **Consistent Input/Output** Format - - Call all models using the OpenAI format - `completion(model, messages)` - - Text responses will always be available at `['choices'][0]['message']['content']` -- **Error Handling** Using Model Fallbacks (if `GPT-4` fails, try `llama2`) -- **Logging** - Log Requests, Responses and Errors to `Supabase`, `Posthog`, `Mixpanel`, `Sentry`, `Helicone` (Any of the supported providers here: https://litellm.readthedocs.io/en/latest/advanced/ - **Example: Logs sent to Supabase** +- **Consistent Input/Output** Format + - Call all models using the OpenAI format - `completion(model, messages)` + - Text responses will always be available at `['choices'][0]['message']['content']` +- **Error Handling** Using Model Fallbacks (if `GPT-4` fails, try `llama2`) +- **Logging** - Log Requests, Responses and Errors to `Supabase`, `Posthog`, `Mixpanel`, `Sentry`, `LLMonitor,` `Helicone` (Any of the supported providers here: https://litellm.readthedocs.io/en/latest/advanced/ + + **Example: Logs sent to Supabase** Screenshot 2023-08-11 at 4 02 46 PM - **Token Usage & Spend** - Track Input + Completion tokens used + Spend/model - **Caching** - Implementation of Semantic Caching - **Streaming & Async Support** - Return generators to stream text responses - ## API Endpoints ### `/chat/completions` (POST) @@ -46,34 +49,37 @@ This endpoint is used to generate chat completions for 50+ support LLM API Models. Use llama2, GPT-4, Claude2 etc #### Input + This API endpoint accepts all inputs in raw JSON and expects the following inputs -- `model` (string, required): ID of the model to use for chat completions. See all supported models [here]: (https://litellm.readthedocs.io/en/latest/supported/): - eg `gpt-3.5-turbo`, `gpt-4`, `claude-2`, `command-nightly`, `stabilityai/stablecode-completion-alpha-3b-4k` + +- `model` (string, required): ID of the model to use for chat completions. See all supported models [here]: (https://litellm.readthedocs.io/en/latest/supported/): + eg `gpt-3.5-turbo`, `gpt-4`, `claude-2`, `command-nightly`, `stabilityai/stablecode-completion-alpha-3b-4k` - `messages` (array, required): A list of messages representing the conversation context. Each message should have a `role` (system, user, assistant, or function), `content` (message text), and `name` (for function role). - Additional Optional parameters: `temperature`, `functions`, `function_call`, `top_p`, `n`, `stream`. See the full list of supported inputs here: https://litellm.readthedocs.io/en/latest/input/ - #### Example JSON body + For claude-2 + ```json { - "model": "claude-2", - "messages": [ - { - "content": "Hello, whats the weather in San Francisco??", - "role": "user" - } - ] - + "model": "claude-2", + "messages": [ + { + "content": "Hello, whats the weather in San Francisco??", + "role": "user" + } + ] } ``` ### Making an API request to the Proxy Server + ```python import requests import json -# TODO: use your URL +# TODO: use your URL url = "http://localhost:5000/chat/completions" payload = json.dumps({ @@ -94,34 +100,38 @@ print(response.text) ``` ### Output [Response Format] -Responses from the server are given in the following format. + +Responses from the server are given in the following format. All responses from the server are returned in the following format (for all LLM models). More info on output here: https://litellm.readthedocs.io/en/latest/output/ + ```json { - "choices": [ - { - "finish_reason": "stop", - "index": 0, - "message": { - "content": "I'm sorry, but I don't have the capability to provide real-time weather information. However, you can easily check the weather in San Francisco by searching online or using a weather app on your phone.", - "role": "assistant" - } - } - ], - "created": 1691790381, - "id": "chatcmpl-7mUFZlOEgdohHRDx2UpYPRTejirzb", - "model": "gpt-3.5-turbo-0613", - "object": "chat.completion", - "usage": { - "completion_tokens": 41, - "prompt_tokens": 16, - "total_tokens": 57 + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "content": "I'm sorry, but I don't have the capability to provide real-time weather information. However, you can easily check the weather in San Francisco by searching online or using a weather app on your phone.", + "role": "assistant" + } } + ], + "created": 1691790381, + "id": "chatcmpl-7mUFZlOEgdohHRDx2UpYPRTejirzb", + "model": "gpt-3.5-turbo-0613", + "object": "chat.completion", + "usage": { + "completion_tokens": 41, + "prompt_tokens": 16, + "total_tokens": 57 + } } ``` ## Installation & Usage + ### Running Locally + 1. Clone liteLLM repository to your local machine: ``` git clone https://github.com/BerriAI/liteLLM-proxy @@ -141,24 +151,24 @@ All responses from the server are returned in the following format (for all LLM python main.py ``` - - ## Deploying + 1. Quick Start: Deploy on Railway [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/DYqQAW?referralCode=t3ukrU) - -2. `GCP`, `AWS`, `Azure` -This project includes a `Dockerfile` allowing you to build and deploy a Docker Project on your providers + +2. `GCP`, `AWS`, `Azure` + This project includes a `Dockerfile` allowing you to build and deploy a Docker Project on your providers # Support / Talk with founders + - [Our calendar 👋](https://calendly.com/d/4mp-gd3-k5k/berriai-1-1-onboarding-litellm-hosted-version) - [Community Discord 💭](https://discord.gg/wuPM9dRgDw) - Our numbers 📞 +1 (770) 8783-106 / +1 (412) 618-6238 - Our emails ✉️ ishaan@berri.ai / krrish@berri.ai - ## Roadmap + - [ ] Support hosted db (e.g. Supabase) - [ ] Easily send data to places like posthog and sentry. - [ ] Add a hot-cache for project spend logs - enables fast checks for user + project limitings diff --git a/litellm/integrations/llmonitor.py b/litellm/integrations/llmonitor.py index e7430b5bb7e..b2940e87266 100644 --- a/litellm/integrations/llmonitor.py +++ b/litellm/integrations/llmonitor.py @@ -5,6 +5,7 @@ import traceback import dotenv import os import requests + dotenv.load_dotenv() # Loading env variables using dotenv @@ -14,45 +15,34 @@ class LLMonitorLogger: # Instance variables self.api_url = os.getenv( "LLMONITOR_API_URL") or "https://app.llmonitor.com" - self.account_id = os.getenv("LLMONITOR_APP_ID") + self.app_id = os.getenv("LLMONITOR_APP_ID") - def log_event(self, model, messages, response_obj, start_time, end_time, print_verbose): + def log_event(self, type, run_id, error, usage, model, messages, + response_obj, user_id, time, print_verbose): # Method definition try: print_verbose( - f"LLMonitor Logging - Enters logging function for model {model}") + f"LLMonitor Logging - Enters logging function for model {model}" + ) - print(model, messages, response_obj, start_time, end_time) + print(type, model, messages, response_obj, time, end_user) - # headers = { - # 'Content-Type': 'application/json' - # } + headers = {'Content-Type': 'application/json'} - # prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar = self.price_calculator( - # model, response_obj, start_time, end_time) - # total_cost = prompt_tokens_cost_usd_dollar + completion_tokens_cost_usd_dollar + data = { + "type": "llm", + "name": model, + "runId": run_id, + "app": self.app_id, + "error": error, + "event": type, + "timestamp": time.isoformat(), + "userId": user_id, + "input": messages, + "output": response_obj['choices'][0]['message']['content'], + } - # response_time = (end_time-start_time).total_seconds() - # if "response" in response_obj: - # data = [{ - # "response_time": response_time, - # "model_id": response_obj["model"], - # "total_cost": total_cost, - # "messages": messages, - # "response": response_obj['choices'][0]['message']['content'], - # "account_id": self.account_id - # }] - # elif "error" in response_obj: - # data = [{ - # "response_time": response_time, - # "model_id": response_obj["model"], - # "total_cost": total_cost, - # "messages": messages, - # "error": response_obj['error'], - # "account_id": self.account_id - # }] - - # print_verbose(f"BerriSpend Logging - final data object: {data}") + print_verbose(f"LLMonitor Logging - final data object: {data}") # response = requests.post(url, headers=headers, json=data) except: # traceback.print_exc() diff --git a/litellm/tests/test_llmonitor_integration.py b/litellm/tests/test_llmonitor_integration.py index 5a4b4beb3b0..d2045e5dc83 100644 --- a/litellm/tests/test_llmonitor_integration.py +++ b/litellm/tests/test_llmonitor_integration.py @@ -1,28 +1,36 @@ #### What this tests #### -# This tests if logging to the helicone integration actually works - -from litellm import embedding, completion -import litellm +# This tests if logging to the llmonitor integration actually works +# Adds the parent directory to the system path import sys import os -import traceback -import pytest -# Adds the parent directory to the system path sys.path.insert(0, os.path.abspath('../..')) +from litellm import completion +import litellm + +litellm.input_callback = ["llmonitor"] litellm.success_callback = ["llmonitor"] +litellm.error_callback = ["llmonitor"] litellm.set_verbose = True -user_message = "Hello, how are you?" -messages = [{"content": user_message, "role": "user"}] - - # openai call -response = completion(model="gpt-3.5-turbo", - messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}]) +# response = completion(model="gpt-3.5-turbo", +# messages=[{ +# "role": "user", +# "content": "Hi 👋 - i'm openai" +# }]) + +# print(response) + +# #bad request call +# response = completion(model="chatgpt-test", messages=[{"role": "user", "content": "Hi 👋 - i'm a bad request"}]) # cohere call -# response = completion(model="command-nightly", -# messages=[{"role": "user", "content": "Hi 👋 - i'm cohere"}]) +response = completion(model="command-nightly", + messages=[{ + "role": "user", + "content": "Hi 👋 - i'm cohere" + }]) +print(response) diff --git a/litellm/utils.py b/litellm/utils.py index e47b559783b..c451095b8fb 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -1,20 +1,7 @@ -import sys -import dotenv, json, traceback, threading -import subprocess, os -import litellm, openai -import random, uuid, requests -import datetime, time -import tiktoken - -encoding = tiktoken.get_encoding("cl100k_base") -import pkg_resources -from .integrations.helicone import HeliconeLogger -from .integrations.aispend import AISpendLogger -from .integrations.berrispend import BerriSpendLogger -from .integrations.supabase import Supabase -from .integrations.litedebugger import LiteDebugger -from openai.error import OpenAIError as OriginalError -from openai.openai_object import OpenAIObject +import aiohttp +import subprocess +import importlib +from typing import List, Dict, Union, Optional from .exceptions import ( AuthenticationError, InvalidRequestError, @@ -22,7 +9,32 @@ from .exceptions import ( ServiceUnavailableError, OpenAIError, ) -from typing import List, Dict, Union, Optional +from openai.openai_object import OpenAIObject +from openai.error import OpenAIError as OriginalError +from .integrations.llmonitor import LLMonitorLogger +from .integrations.litedebugger import LiteDebugger +from .integrations.supabase import Supabase +from .integrations.berrispend import BerriSpendLogger +from .integrations.aispend import AISpendLogger +from .integrations.helicone import HeliconeLogger +import pkg_resources +import sys +import dotenv +import json +import traceback +import threading +import subprocess +import os +import litellm +import openai +import random +import uuid +import requests +import datetime +import time +import tiktoken + +encoding = tiktoken.get_encoding("cl100k_base") ####### ENVIRONMENT VARIABLES ################### dotenv.load_dotenv() # Loading env variables using dotenv @@ -37,6 +49,7 @@ aispendLogger = None berrispendLogger = None supabaseClient = None liteDebuggerClient = None +llmonitorLogger = None callback_list: Optional[List[str]] = [] user_logger_fn = None additional_details: Optional[Dict[str, str]] = {} @@ -63,6 +76,7 @@ local_cache: Optional[Dict[str, str]] = {} class Message(OpenAIObject): + def __init__(self, content="default", role="assistant", **params): super(Message, self).__init__(**params) self.content = content @@ -70,7 +84,12 @@ class Message(OpenAIObject): class Choices(OpenAIObject): - def __init__(self, finish_reason="stop", index=0, message=Message(), **params): + + def __init__(self, + finish_reason="stop", + index=0, + message=Message(), + **params): super(Choices, self).__init__(**params) self.finish_reason = finish_reason self.index = index @@ -78,20 +97,22 @@ class Choices(OpenAIObject): class ModelResponse(OpenAIObject): - def __init__(self, choices=None, created=None, model=None, usage=None, **params): + + def __init__(self, + choices=None, + created=None, + model=None, + usage=None, + **params): super(ModelResponse, self).__init__(**params) self.choices = choices if choices else [Choices()] self.created = created self.model = model - self.usage = ( - usage - if usage - else { - "prompt_tokens": None, - "completion_tokens": None, - "total_tokens": None, - } - ) + self.usage = (usage if usage else { + "prompt_tokens": None, + "completion_tokens": None, + "total_tokens": None, + }) def to_dict_recursive(self): d = super().to_dict_recursive() @@ -108,8 +129,6 @@ def print_verbose(print_statement): ####### Package Import Handler ################### -import importlib -import subprocess def install_and_import(package: str): @@ -139,6 +158,7 @@ def install_and_import(package: str): # Logging function -> log the exact model details + what's being sent | Non-Blocking class Logging: global supabaseClient, liteDebuggerClient + def __init__(self, model, messages, optional_params, litellm_params): self.model = model self.messages = messages @@ -146,20 +166,20 @@ class Logging: self.litellm_params = litellm_params self.logger_fn = litellm_params["logger_fn"] self.model_call_details = { - "model": model, - "messages": messages, + "model": model, + "messages": messages, "optional_params": self.optional_params, "litellm_params": self.litellm_params, } - + def pre_call(self, input, api_key, additional_args={}): try: print(f"logging pre call for model: {self.model}") self.model_call_details["input"] = input self.model_call_details["api_key"] = api_key self.model_call_details["additional_args"] = additional_args - - ## User Logging -> if you pass in a custom logging function + + # User Logging -> if you pass in a custom logging function print_verbose( f"Logging Details: logger_fn - {self.logger_fn} | callable(logger_fn) - {callable(self.logger_fn)}" ) @@ -173,7 +193,7 @@ class Logging: f"LiteLLM.LoggingError: [Non-Blocking] Exception occurred while logging {traceback.format_exc()}" ) - ## Input Integration Logging -> If you want to log the fact that an attempt to call the model was made + # Input Integration Logging -> If you want to log the fact that an attempt to call the model was made for callback in litellm.input_callback: try: if callback == "supabase": @@ -185,7 +205,21 @@ class Logging: model=model, messages=messages, end_user=litellm._thread_context.user, - litellm_call_id=self.litellm_params["litellm_call_id"], + litellm_call_id=self. + litellm_params["litellm_call_id"], + print_verbose=print_verbose, + ) + elif callback == "llmonitor": + print_verbose("reaches llmonitor for logging!") + model = self.model + messages = self.messages + print(f"liteDebuggerClient: {liteDebuggerClient}") + llmonitorLogger.log_event( + type="start", + model=model, + messages=messages, + user_id=litellm._thread_context.user, + run_id=self.litellm_params["litellm_call_id"], print_verbose=print_verbose, ) elif callback == "lite_debugger": @@ -197,15 +231,18 @@ class Logging: model=model, messages=messages, end_user=litellm._thread_context.user, - litellm_call_id=self.litellm_params["litellm_call_id"], + litellm_call_id=self. + litellm_params["litellm_call_id"], print_verbose=print_verbose, ) except Exception as e: - print_verbose(f"LiteLLM.LoggingError: [Non-Blocking] Exception occurred while input logging with integrations {traceback.format_exc()}") + print_verbose( + f"LiteLLM.LoggingError: [Non-Blocking] Exception occurred while input logging with integrations {traceback.format_exc()}" + ) print_verbose( f"LiteLLM.Logging: is sentry capture exception initialized {capture_exception}" ) - if capture_exception: # log this error to sentry for debugging + if capture_exception: # log this error to sentry for debugging capture_exception(e) except: print_verbose( @@ -214,9 +251,9 @@ class Logging: print_verbose( f"LiteLLM.Logging: is sentry capture exception initialized {capture_exception}" ) - if capture_exception: # log this error to sentry for debugging + if capture_exception: # log this error to sentry for debugging capture_exception(e) - + def post_call(self, input, api_key, original_response, additional_args={}): # Do something here try: @@ -224,8 +261,8 @@ class Logging: self.model_call_details["api_key"] = api_key self.model_call_details["original_response"] = original_response self.model_call_details["additional_args"] = additional_args - - ## User Logging -> if you pass in a custom logging function + + # User Logging -> if you pass in a custom logging function print_verbose( f"Logging Details: logger_fn - {self.logger_fn} | callable(logger_fn) - {callable(self.logger_fn)}" ) @@ -243,9 +280,9 @@ class Logging: f"LiteLLM.LoggingError: [Non-Blocking] Exception occurred while logging {traceback.format_exc()}" ) pass - + # Add more methods as needed - + def exception_logging( additional_args={}, @@ -257,7 +294,7 @@ def exception_logging( if exception: model_call_details["exception"] = exception model_call_details["additional_args"] = additional_args - ## User Logging -> if you pass in a custom logging function or want to use sentry breadcrumbs + # User Logging -> if you pass in a custom logging function or want to use sentry breadcrumbs print_verbose( f"Logging Details: logger_fn - {logger_fn} | callable(logger_fn) - {callable(logger_fn)}" ) @@ -280,20 +317,20 @@ def exception_logging( ####### CLIENT ################### # make it easy to log if completion/embedding runs succeeded or failed + see what happened | Non-Blocking def client(original_function): + def function_setup( *args, **kwargs ): # just run once to check if user wants to send their data anywhere - PostHog/Sentry/Slack/etc. try: global callback_list, add_breadcrumb, user_logger_fn - if ( - len(litellm.input_callback) > 0 or len(litellm.success_callback) > 0 or len(litellm.failure_callback) > 0 - ) and len(callback_list) == 0: + if (len(litellm.input_callback) > 0 + or len(litellm.success_callback) > 0 + or len(litellm.failure_callback) + > 0) and len(callback_list) == 0: callback_list = list( - set(litellm.input_callback + litellm.success_callback + litellm.failure_callback) - ) - set_callbacks( - callback_list=callback_list, - ) + set(litellm.input_callback + litellm.success_callback + + litellm.failure_callback)) + set_callbacks(callback_list=callback_list, ) if add_breadcrumb: add_breadcrumb( category="litellm.llm_call", @@ -310,12 +347,11 @@ def client(original_function): if litellm.telemetry: try: model = args[0] if len(args) > 0 else kwargs["model"] - exception = kwargs["exception"] if "exception" in kwargs else None - custom_llm_provider = ( - kwargs["custom_llm_provider"] - if "custom_llm_provider" in kwargs - else None - ) + exception = kwargs[ + "exception"] if "exception" in kwargs else None + custom_llm_provider = (kwargs["custom_llm_provider"] + if "custom_llm_provider" in kwargs else + None) safe_crash_reporting( model=model, exception=exception, @@ -340,15 +376,12 @@ def client(original_function): def check_cache(*args, **kwargs): try: # never block execution prompt = get_prompt(*args, **kwargs) - if ( - prompt != None and prompt in local_cache - ): # check if messages / prompt exists + if (prompt != None and prompt + in local_cache): # check if messages / prompt exists if litellm.caching_with_models: # if caching with model names is enabled, key is prompt + model name - if ( - "model" in kwargs - and kwargs["model"] in local_cache[prompt]["models"] - ): + if ("model" in kwargs and kwargs["model"] + in local_cache[prompt]["models"]): cache_key = prompt + kwargs["model"] return local_cache[cache_key] else: # caching only with prompts @@ -363,10 +396,8 @@ def client(original_function): try: # never block execution prompt = get_prompt(*args, **kwargs) if litellm.caching_with_models: # caching with model + prompt - if ( - "model" in kwargs - and kwargs["model"] in local_cache[prompt]["models"] - ): + if ("model" in kwargs + and kwargs["model"] in local_cache[prompt]["models"]): cache_key = prompt + kwargs["model"] local_cache[cache_key] = result else: # caching based only on prompts @@ -381,24 +412,24 @@ def client(original_function): function_setup(*args, **kwargs) litellm_call_id = str(uuid.uuid4()) kwargs["litellm_call_id"] = litellm_call_id - ## [OPTIONAL] CHECK CACHE + # [OPTIONAL] CHECK CACHE start_time = datetime.datetime.now() if (litellm.caching or litellm.caching_with_models) and ( - cached_result := check_cache(*args, **kwargs) - ) is not None: + cached_result := check_cache(*args, **kwargs)) is not None: result = cached_result else: - ## MODEL CALL + # MODEL CALL result = original_function(*args, **kwargs) end_time = datetime.datetime.now() - ## Add response to CACHE + # Add response to CACHE if litellm.caching: add_cache(result, *args, **kwargs) - ## LOG SUCCESS + # LOG SUCCESS crash_reporting(*args, **kwargs) my_thread = threading.Thread( - target=handle_success, args=(args, kwargs, result, start_time, end_time) - ) # don't interrupt execution of main thread + target=handle_success, + args=(args, kwargs, result, start_time, + end_time)) # don't interrupt execution of main thread my_thread.start() return result except Exception as e: @@ -407,7 +438,8 @@ def client(original_function): end_time = datetime.datetime.now() my_thread = threading.Thread( target=handle_failure, - args=(e, traceback_exception, start_time, end_time, args, kwargs), + args=(e, traceback_exception, start_time, end_time, args, + kwargs), ) # don't interrupt execution of main thread my_thread.start() raise e @@ -432,18 +464,18 @@ def token_counter(model, text): return num_tokens -def cost_per_token(model="gpt-3.5-turbo", prompt_tokens=0, completion_tokens=0): - ## given +def cost_per_token(model="gpt-3.5-turbo", + prompt_tokens=0, + completion_tokens=0): + # given prompt_tokens_cost_usd_dollar = 0 completion_tokens_cost_usd_dollar = 0 model_cost_ref = litellm.model_cost if model in model_cost_ref: prompt_tokens_cost_usd_dollar = ( - model_cost_ref[model]["input_cost_per_token"] * prompt_tokens - ) + model_cost_ref[model]["input_cost_per_token"] * prompt_tokens) completion_tokens_cost_usd_dollar = ( - model_cost_ref[model]["output_cost_per_token"] * completion_tokens - ) + model_cost_ref[model]["output_cost_per_token"] * completion_tokens) return prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar else: # calculate average input cost @@ -464,8 +496,9 @@ def completion_cost(model="gpt-3.5-turbo", prompt="", completion=""): prompt_tokens = token_counter(model=model, text=prompt) completion_tokens = token_counter(model=model, text=completion) prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar = cost_per_token( - model=model, prompt_tokens=prompt_tokens, completion_tokens=completion_tokens - ) + model=model, + prompt_tokens=prompt_tokens, + completion_tokens=completion_tokens) return prompt_tokens_cost_usd_dollar + completion_tokens_cost_usd_dollar @@ -557,9 +590,8 @@ def get_optional_params( optional_params["max_tokens"] = max_tokens if frequency_penalty != 0: optional_params["frequency_penalty"] = frequency_penalty - elif ( - model == "chat-bison" - ): # chat-bison has diff args from chat-bison@001 ty Google + elif (model == "chat-bison" + ): # chat-bison has diff args from chat-bison@001 ty Google if temperature != 1: optional_params["temperature"] = temperature if top_p != 1: @@ -619,7 +651,10 @@ def load_test_model( test_prompt = prompt if num_calls: test_calls = num_calls - messages = [[{"role": "user", "content": test_prompt}] for _ in range(test_calls)] + messages = [[{ + "role": "user", + "content": test_prompt + }] for _ in range(test_calls)] start_time = time.time() try: litellm.batch_completion( @@ -649,7 +684,7 @@ def load_test_model( def set_callbacks(callback_list): - global sentry_sdk_instance, capture_exception, add_breadcrumb, posthog, slack_app, alerts_channel, heliconeLogger, aispendLogger, berrispendLogger, supabaseClient, liteDebuggerClient + global sentry_sdk_instance, capture_exception, add_breadcrumb, posthog, slack_app, alerts_channel, heliconeLogger, aispendLogger, berrispendLogger, supabaseClient, liteDebuggerClient, llmonitorLogger try: for callback in callback_list: print(f"callback: {callback}") @@ -657,17 +692,15 @@ def set_callbacks(callback_list): try: import sentry_sdk except ImportError: - print_verbose("Package 'sentry_sdk' is missing. Installing it...") + print_verbose( + "Package 'sentry_sdk' is missing. Installing it...") subprocess.check_call( - [sys.executable, "-m", "pip", "install", "sentry_sdk"] - ) + [sys.executable, "-m", "pip", "install", "sentry_sdk"]) import sentry_sdk sentry_sdk_instance = sentry_sdk - sentry_trace_rate = ( - os.environ.get("SENTRY_API_TRACE_RATE") - if "SENTRY_API_TRACE_RATE" in os.environ - else "1.0" - ) + sentry_trace_rate = (os.environ.get("SENTRY_API_TRACE_RATE") + if "SENTRY_API_TRACE_RATE" in os.environ + else "1.0") sentry_sdk_instance.init( dsn=os.environ.get("SENTRY_API_URL"), traces_sample_rate=float(sentry_trace_rate), @@ -678,10 +711,10 @@ def set_callbacks(callback_list): try: from posthog import Posthog except ImportError: - print_verbose("Package 'posthog' is missing. Installing it...") + print_verbose( + "Package 'posthog' is missing. Installing it...") subprocess.check_call( - [sys.executable, "-m", "pip", "install", "posthog"] - ) + [sys.executable, "-m", "pip", "install", "posthog"]) from posthog import Posthog posthog = Posthog( project_api_key=os.environ.get("POSTHOG_API_KEY"), @@ -691,10 +724,10 @@ def set_callbacks(callback_list): try: from slack_bolt import App except ImportError: - print_verbose("Package 'slack_bolt' is missing. Installing it...") + print_verbose( + "Package 'slack_bolt' is missing. Installing it...") subprocess.check_call( - [sys.executable, "-m", "pip", "install", "slack_bolt"] - ) + [sys.executable, "-m", "pip", "install", "slack_bolt"]) from slack_bolt import App slack_app = App( token=os.environ.get("SLACK_API_TOKEN"), @@ -704,6 +737,8 @@ def set_callbacks(callback_list): print_verbose(f"Initialized Slack App: {slack_app}") elif callback == "helicone": heliconeLogger = HeliconeLogger() + elif callback == "llmonitor": + llmonitorLogger = LLMonitorLogger() elif callback == "aispend": aispendLogger = AISpendLogger() elif callback == "berrispend": @@ -718,7 +753,8 @@ def set_callbacks(callback_list): raise e -def handle_failure(exception, traceback_exception, start_time, end_time, args, kwargs): +def handle_failure(exception, traceback_exception, start_time, end_time, args, + kwargs): global sentry_sdk_instance, capture_exception, add_breadcrumb, posthog, slack_app, alerts_channel, aispendLogger, berrispendLogger, supabaseClient, liteDebuggerClient try: # print_verbose(f"handle_failure args: {args}") @@ -728,8 +764,7 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k failure_handler = additional_details.pop("failure_handler", None) additional_details["Event_Name"] = additional_details.pop( - "failed_event_name", "litellm.failed_query" - ) + "failed_event_name", "litellm.failed_query") print_verbose(f"self.failure_callback: {litellm.failure_callback}") # print_verbose(f"additional_details: {additional_details}") @@ -746,9 +781,8 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k for detail in additional_details: slack_msg += f"{detail}: {additional_details[detail]}\n" slack_msg += f"Traceback: {traceback_exception}" - slack_app.client.chat_postMessage( - channel=alerts_channel, text=slack_msg - ) + slack_app.client.chat_postMessage(channel=alerts_channel, + text=slack_msg) elif callback == "sentry": capture_exception(exception) elif callback == "posthog": @@ -767,9 +801,8 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k print_verbose(f"ph_obj: {ph_obj}") print_verbose(f"PostHog Event Name: {event_name}") if "user_id" in additional_details: - posthog.capture( - additional_details["user_id"], event_name, ph_obj - ) + posthog.capture(additional_details["user_id"], + event_name, ph_obj) else: # PostHog calls require a unique id to identify a user - https://posthog.com/docs/libraries/python unique_id = str(uuid.uuid4()) posthog.capture(unique_id, event_name) @@ -783,10 +816,10 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k "created": time.time(), "error": traceback_exception, "usage": { - "prompt_tokens": prompt_token_calculator( - model, messages=messages - ), - "completion_tokens": 0, + "prompt_tokens": + prompt_token_calculator(model, messages=messages), + "completion_tokens": + 0, }, } berrispendLogger.log_event( @@ -805,10 +838,10 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k "model": model, "created": time.time(), "usage": { - "prompt_tokens": prompt_token_calculator( - model, messages=messages - ), - "completion_tokens": 0, + "prompt_tokens": + prompt_token_calculator(model, messages=messages), + "completion_tokens": + 0, }, } aispendLogger.log_event( @@ -818,6 +851,27 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k end_time=end_time, print_verbose=print_verbose, ) + elif callback == "llmonitor": + print_verbose("reaches llmonitor for logging!") + model = args[0] if len(args) > 0 else kwargs["model"] + messages = args[1] if len(args) > 1 else kwargs["messages"] + usage = { + "prompt_tokens": + prompt_token_calculator(model, messages=messages), + "completion_tokens": + 0, + } + llmonitorLogger.log_event( + type="error", + user_id=litellm._thread_context.user, + model=model, + error=traceback_exception, + response_obj=result, + run_id=kwargs["litellm_call_id"], + timestamp=end_time, + usage=usage, + print_verbose=print_verbose, + ) elif callback == "supabase": print_verbose("reaches supabase for logging!") print_verbose(f"supabaseClient: {supabaseClient}") @@ -828,10 +882,10 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k "created": time.time(), "error": traceback_exception, "usage": { - "prompt_tokens": prompt_token_calculator( - model, messages=messages - ), - "completion_tokens": 0, + "prompt_tokens": + prompt_token_calculator(model, messages=messages), + "completion_tokens": + 0, }, } supabaseClient.log_event( @@ -854,10 +908,10 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k "created": time.time(), "error": traceback_exception, "usage": { - "prompt_tokens": prompt_token_calculator( - model, messages=messages - ), - "completion_tokens": 0, + "prompt_tokens": + prompt_token_calculator(model, messages=messages), + "completion_tokens": + 0, }, } liteDebuggerClient.log_event( @@ -884,19 +938,18 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k failure_handler(call_details) pass except Exception as e: - ## LOGGING + # LOGGING exception_logging(logger_fn=user_logger_fn, exception=e) pass def handle_success(args, kwargs, result, start_time, end_time): - global heliconeLogger, aispendLogger, supabaseClient, liteDebuggerClient + global heliconeLogger, aispendLogger, supabaseClient, liteDebuggerClient, llmonitorLogger try: success_handler = additional_details.pop("success_handler", None) failure_handler = additional_details.pop("failure_handler", None) additional_details["Event_Name"] = additional_details.pop( - "successful_event_name", "litellm.succes_query" - ) + "successful_event_name", "litellm.succes_query") for callback in litellm.success_callback: try: if callback == "posthog": @@ -905,9 +958,8 @@ def handle_success(args, kwargs, result, start_time, end_time): ph_obj[detail] = additional_details[detail] event_name = additional_details["Event_Name"] if "user_id" in additional_details: - posthog.capture( - additional_details["user_id"], event_name, ph_obj - ) + posthog.capture(additional_details["user_id"], + event_name, ph_obj) else: # PostHog calls require a unique id to identify a user - https://posthog.com/docs/libraries/python unique_id = str(uuid.uuid4()) posthog.capture(unique_id, event_name, ph_obj) @@ -916,9 +968,8 @@ def handle_success(args, kwargs, result, start_time, end_time): slack_msg = "" for detail in additional_details: slack_msg += f"{detail}: {additional_details[detail]}\n" - slack_app.client.chat_postMessage( - channel=alerts_channel, text=slack_msg - ) + slack_app.client.chat_postMessage(channel=alerts_channel, + text=slack_msg) elif callback == "helicone": print_verbose("reaches helicone for logging!") model = args[0] if len(args) > 0 else kwargs["model"] @@ -931,6 +982,22 @@ def handle_success(args, kwargs, result, start_time, end_time): end_time=end_time, print_verbose=print_verbose, ) + elif callback == "llmonitor": + print_verbose("reaches llmonitor for logging!") + model = args[0] if len(args) > 0 else kwargs["model"] + messages = args[1] if len(args) > 1 else kwargs["messages"] + usage = kwargs["usage"] + llmonitorLogger.log_event( + type="end", + model=model, + messages=messages, + user_id=litellm._thread_context.user, + response_obj=result, + time=end_time, + usage=usage, + run_id=kwargs["litellm_call_id"], + print_verbose=print_verbose, + ) elif callback == "aispend": print_verbose("reaches aispend for logging!") model = args[0] if len(args) > 0 else kwargs["model"] @@ -984,7 +1051,7 @@ def handle_success(args, kwargs, result, start_time, end_time): print_verbose=print_verbose, ) except Exception as e: - ## LOGGING + # LOGGING exception_logging(logger_fn=user_logger_fn, exception=e) print_verbose( f"[Non-Blocking] Success Callback Error - {traceback.format_exc()}" @@ -995,7 +1062,7 @@ def handle_success(args, kwargs, result, start_time, end_time): success_handler(args, kwargs) pass except Exception as e: - ## LOGGING + # LOGGING exception_logging(logger_fn=user_logger_fn, exception=e) print_verbose( f"[Non-Blocking] Success Callback Error - {traceback.format_exc()}" @@ -1046,33 +1113,36 @@ def exception_type(model, original_exception, custom_llm_provider): exception_type = "" if "claude" in model: # one of the anthropics if hasattr(original_exception, "status_code"): - print_verbose(f"status_code: {original_exception.status_code}") + print_verbose( + f"status_code: {original_exception.status_code}") if original_exception.status_code == 401: exception_mapping_worked = True raise AuthenticationError( - message=f"AnthropicException - {original_exception.message}", + message= + f"AnthropicException - {original_exception.message}", llm_provider="anthropic", ) elif original_exception.status_code == 400: exception_mapping_worked = True raise InvalidRequestError( - message=f"AnthropicException - {original_exception.message}", + message= + f"AnthropicException - {original_exception.message}", model=model, llm_provider="anthropic", ) elif original_exception.status_code == 429: exception_mapping_worked = True raise RateLimitError( - message=f"AnthropicException - {original_exception.message}", + message= + f"AnthropicException - {original_exception.message}", llm_provider="anthropic", ) - elif ( - "Could not resolve authentication method. Expected either api_key or auth_token to be set." - in error_str - ): + elif ("Could not resolve authentication method. Expected either api_key or auth_token to be set." + in error_str): exception_mapping_worked = True raise AuthenticationError( - message=f"AnthropicException - {original_exception.message}", + message= + f"AnthropicException - {original_exception.message}", llm_provider="anthropic", ) elif "replicate" in model: @@ -1096,35 +1166,36 @@ def exception_type(model, original_exception, custom_llm_provider): llm_provider="replicate", ) elif ( - exception_type == "ReplicateError" - ): ## ReplicateError implies an error on Replicate server side, not user side + exception_type == "ReplicateError" + ): # ReplicateError implies an error on Replicate server side, not user side raise ServiceUnavailableError( message=f"ReplicateException - {error_str}", llm_provider="replicate", ) elif model == "command-nightly": # Cohere - if ( - "invalid api token" in error_str - or "No API key provided." in error_str - ): + if ("invalid api token" in error_str + or "No API key provided." in error_str): exception_mapping_worked = True raise AuthenticationError( - message=f"CohereException - {original_exception.message}", + message= + f"CohereException - {original_exception.message}", llm_provider="cohere", ) elif "too many tokens" in error_str: exception_mapping_worked = True raise InvalidRequestError( - message=f"CohereException - {original_exception.message}", + message= + f"CohereException - {original_exception.message}", model=model, llm_provider="cohere", ) elif ( - "CohereConnectionError" in exception_type + "CohereConnectionError" in exception_type ): # cohere seems to fire these errors when we load test it (1k+ messages / min) exception_mapping_worked = True raise RateLimitError( - message=f"CohereException - {original_exception.message}", + message= + f"CohereException - {original_exception.message}", llm_provider="cohere", ) elif custom_llm_provider == "huggingface": @@ -1132,27 +1203,30 @@ def exception_type(model, original_exception, custom_llm_provider): if original_exception.status_code == 401: exception_mapping_worked = True raise AuthenticationError( - message=f"HuggingfaceException - {original_exception.message}", + message= + f"HuggingfaceException - {original_exception.message}", llm_provider="huggingface", ) elif original_exception.status_code == 400: exception_mapping_worked = True raise InvalidRequestError( - message=f"HuggingfaceException - {original_exception.message}", + message= + f"HuggingfaceException - {original_exception.message}", model=model, llm_provider="huggingface", ) elif original_exception.status_code == 429: exception_mapping_worked = True raise RateLimitError( - message=f"HuggingfaceException - {original_exception.message}", + message= + f"HuggingfaceException - {original_exception.message}", llm_provider="huggingface", ) raise original_exception # base case - return the original exception else: raise original_exception except Exception as e: - ## LOGGING + # LOGGING exception_logging( logger_fn=user_logger_fn, additional_args={ @@ -1173,7 +1247,7 @@ def safe_crash_reporting(model=None, exception=None, custom_llm_provider=None): "exception": str(exception), "custom_llm_provider": custom_llm_provider, } - threading.Thread(target=litellm_telemetry, args=(data,)).start() + threading.Thread(target=litellm_telemetry, args=(data, )).start() def litellm_telemetry(data): @@ -1223,11 +1297,13 @@ def get_secret(secret_name): if litellm.secret_manager_client != None: # TODO: check which secret manager is being used # currently only supports Infisical - secret = litellm.secret_manager_client.get_secret(secret_name).secret_value + secret = litellm.secret_manager_client.get_secret( + secret_name).secret_value if secret != None: return secret # if secret found in secret manager return it else: - raise ValueError(f"Secret '{secret_name}' not found in secret manager") + raise ValueError( + f"Secret '{secret_name}' not found in secret manager") elif litellm.api_key != None: # if users use litellm default key return litellm.api_key else: @@ -1238,6 +1314,7 @@ def get_secret(secret_name): # wraps the completion stream to return the correct format for the model # replicate/anthropic/cohere class CustomStreamWrapper: + def __init__(self, completion_stream, model, custom_llm_provider=None): self.model = model self.custom_llm_provider = custom_llm_provider @@ -1288,7 +1365,8 @@ class CustomStreamWrapper: elif self.model == "replicate": chunk = next(self.completion_stream) completion_obj["content"] = chunk - elif (self.model == "together_ai") or ("togethercomputer" in self.model): + elif (self.model == "together_ai") or ("togethercomputer" + in self.model): chunk = next(self.completion_stream) text_data = self.handle_together_ai_chunk(chunk) if text_data == "": @@ -1321,12 +1399,11 @@ def read_config_args(config_path): ########## ollama implementation ############################ -import aiohttp -async def get_ollama_response_stream( - api_base="http://localhost:11434", model="llama2", prompt="Why is the sky blue?" -): +async def get_ollama_response_stream(api_base="http://localhost:11434", + model="llama2", + prompt="Why is the sky blue?"): session = aiohttp.ClientSession() url = f"{api_base}/api/generate" data = { @@ -1349,7 +1426,11 @@ async def get_ollama_response_stream( "content": "", } completion_obj["content"] = j["response"] - yield {"choices": [{"delta": completion_obj}]} + yield { + "choices": [{ + "delta": completion_obj + }] + } # self.responses.append(j["response"]) # yield "blank" except Exception as e: diff --git a/proxy-server/readme.md b/proxy-server/readme.md index 4f735f38c65..edd03de3fd3 100644 --- a/proxy-server/readme.md +++ b/proxy-server/readme.md @@ -1,6 +1,7 @@ - # liteLLM Proxy Server: 50+ LLM Models, Error Handling, Caching + ### Azure, Llama2, OpenAI, Claude, Hugging Face, Replicate Models + [![PyPI Version](https://img.shields.io/pypi/v/litellm.svg)](https://pypi.org/project/litellm/) [![PyPI Version](https://img.shields.io/badge/stable%20version-v0.1.345-blue?color=green&link=https://pypi.org/project/litellm/0.1.1/)](https://pypi.org/project/litellm/0.1.1/) ![Downloads](https://img.shields.io/pypi/dm/litellm) @@ -11,34 +12,36 @@ ![4BC6491E-86D0-4833-B061-9F54524B2579](https://github.com/BerriAI/litellm/assets/17561003/f5dd237b-db5e-42e1-b1ac-f05683b1d724) ## What does liteLLM proxy do + - Make `/chat/completions` requests for 50+ LLM models **Azure, OpenAI, Replicate, Anthropic, Hugging Face** - + Example: for `model` use `claude-2`, `gpt-3.5`, `gpt-4`, `command-nightly`, `stabilityai/stablecode-completion-alpha-3b-4k` + ```json { "model": "replicate/llama-2-70b-chat:2c1608e18606fad2812020dc541930f2d0495ce32eee50074220b87300bc16e1", "messages": [ - { - "content": "Hello, whats the weather in San Francisco??", - "role": "user" - } - ] + { + "content": "Hello, whats the weather in San Francisco??", + "role": "user" + } + ] } ``` -- **Consistent Input/Output** Format - - Call all models using the OpenAI format - `completion(model, messages)` - - Text responses will always be available at `['choices'][0]['message']['content']` -- **Error Handling** Using Model Fallbacks (if `GPT-4` fails, try `llama2`) -- **Logging** - Log Requests, Responses and Errors to `Supabase`, `Posthog`, `Mixpanel`, `Sentry`, `Helicone` (Any of the supported providers here: https://litellm.readthedocs.io/en/latest/advanced/ - **Example: Logs sent to Supabase** +- **Consistent Input/Output** Format + - Call all models using the OpenAI format - `completion(model, messages)` + - Text responses will always be available at `['choices'][0]['message']['content']` +- **Error Handling** Using Model Fallbacks (if `GPT-4` fails, try `llama2`) +- **Logging** - Log Requests, Responses and Errors to `Supabase`, `Posthog`, `Mixpanel`, `Sentry`, `Helicone`, `LLMonitor` (Any of the supported providers here: https://litellm.readthedocs.io/en/latest/advanced/ + + **Example: Logs sent to Supabase** Screenshot 2023-08-11 at 4 02 46 PM - **Token Usage & Spend** - Track Input + Completion tokens used + Spend/model - **Caching** - Implementation of Semantic Caching - **Streaming & Async Support** - Return generators to stream text responses - ## API Endpoints ### `/chat/completions` (POST) @@ -46,34 +49,37 @@ This endpoint is used to generate chat completions for 50+ support LLM API Models. Use llama2, GPT-4, Claude2 etc #### Input + This API endpoint accepts all inputs in raw JSON and expects the following inputs -- `model` (string, required): ID of the model to use for chat completions. See all supported models [here]: (https://litellm.readthedocs.io/en/latest/supported/): - eg `gpt-3.5-turbo`, `gpt-4`, `claude-2`, `command-nightly`, `stabilityai/stablecode-completion-alpha-3b-4k` + +- `model` (string, required): ID of the model to use for chat completions. See all supported models [here]: (https://litellm.readthedocs.io/en/latest/supported/): + eg `gpt-3.5-turbo`, `gpt-4`, `claude-2`, `command-nightly`, `stabilityai/stablecode-completion-alpha-3b-4k` - `messages` (array, required): A list of messages representing the conversation context. Each message should have a `role` (system, user, assistant, or function), `content` (message text), and `name` (for function role). - Additional Optional parameters: `temperature`, `functions`, `function_call`, `top_p`, `n`, `stream`. See the full list of supported inputs here: https://litellm.readthedocs.io/en/latest/input/ - #### Example JSON body + For claude-2 + ```json { - "model": "claude-2", - "messages": [ - { - "content": "Hello, whats the weather in San Francisco??", - "role": "user" - } - ] - + "model": "claude-2", + "messages": [ + { + "content": "Hello, whats the weather in San Francisco??", + "role": "user" + } + ] } ``` ### Making an API request to the Proxy Server + ```python import requests import json -# TODO: use your URL +# TODO: use your URL url = "http://localhost:5000/chat/completions" payload = json.dumps({ @@ -94,34 +100,38 @@ print(response.text) ``` ### Output [Response Format] -Responses from the server are given in the following format. + +Responses from the server are given in the following format. All responses from the server are returned in the following format (for all LLM models). More info on output here: https://litellm.readthedocs.io/en/latest/output/ + ```json { - "choices": [ - { - "finish_reason": "stop", - "index": 0, - "message": { - "content": "I'm sorry, but I don't have the capability to provide real-time weather information. However, you can easily check the weather in San Francisco by searching online or using a weather app on your phone.", - "role": "assistant" - } - } - ], - "created": 1691790381, - "id": "chatcmpl-7mUFZlOEgdohHRDx2UpYPRTejirzb", - "model": "gpt-3.5-turbo-0613", - "object": "chat.completion", - "usage": { - "completion_tokens": 41, - "prompt_tokens": 16, - "total_tokens": 57 + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "content": "I'm sorry, but I don't have the capability to provide real-time weather information. However, you can easily check the weather in San Francisco by searching online or using a weather app on your phone.", + "role": "assistant" + } } + ], + "created": 1691790381, + "id": "chatcmpl-7mUFZlOEgdohHRDx2UpYPRTejirzb", + "model": "gpt-3.5-turbo-0613", + "object": "chat.completion", + "usage": { + "completion_tokens": 41, + "prompt_tokens": 16, + "total_tokens": 57 + } } ``` ## Installation & Usage + ### Running Locally + 1. Clone liteLLM repository to your local machine: ``` git clone https://github.com/BerriAI/liteLLM-proxy @@ -141,24 +151,24 @@ All responses from the server are returned in the following format (for all LLM python main.py ``` - - ## Deploying + 1. Quick Start: Deploy on Railway [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/DYqQAW?referralCode=t3ukrU) - -2. `GCP`, `AWS`, `Azure` -This project includes a `Dockerfile` allowing you to build and deploy a Docker Project on your providers + +2. `GCP`, `AWS`, `Azure` + This project includes a `Dockerfile` allowing you to build and deploy a Docker Project on your providers # Support / Talk with founders + - [Our calendar 👋](https://calendly.com/d/4mp-gd3-k5k/berriai-1-1-onboarding-litellm-hosted-version) - [Community Discord 💭](https://discord.gg/wuPM9dRgDw) - Our numbers 📞 +1 (770) 8783-106 / +1 (412) 618-6238 - Our emails ✉️ ishaan@berri.ai / krrish@berri.ai - ## Roadmap + - [ ] Support hosted db (e.g. Supabase) - [ ] Easily send data to places like posthog and sentry. - [ ] Add a hot-cache for project spend logs - enables fast checks for user + project limitings From 9a43b238764e38cdaaad27956c1090fde6a9ee62 Mon Sep 17 00:00:00 2001 From: Vince Lwt Date: Mon, 21 Aug 2023 17:01:00 +0200 Subject: [PATCH 004/174] clean format --- litellm/integrations/llmonitor.py | 60 +++++++++++++++++++-- litellm/tests/test_llmonitor_integration.py | 13 ++++- litellm/utils.py | 2 - 3 files changed, 66 insertions(+), 9 deletions(-) diff --git a/litellm/integrations/llmonitor.py b/litellm/integrations/llmonitor.py index b2940e87266..6fa208f9958 100644 --- a/litellm/integrations/llmonitor.py +++ b/litellm/integrations/llmonitor.py @@ -9,6 +9,37 @@ import requests dotenv.load_dotenv() # Loading env variables using dotenv +# convert to {completion: xx, tokens: xx} +def parse_usage(usage): + return { + "completion": usage["completion_tokens"], + "prompt": usage["prompt_tokens"], + } + + +def parse_messages(input): + + if input is None: + return None + + def clean_message(message): + if "message" in message: + return clean_message(message["message"]) + + return { + "role": message["role"], + "text": message["content"], + } + + if isinstance(input, list): + if len(input) == 1: + return clean_message(input[0]) + else: + return [clean_message(msg) for msg in input] + else: + return clean_message(input) + + class LLMonitorLogger: # Class variables or attributes def __init__(self): @@ -17,15 +48,33 @@ class LLMonitorLogger: "LLMONITOR_API_URL") or "https://app.llmonitor.com" self.app_id = os.getenv("LLMONITOR_APP_ID") - def log_event(self, type, run_id, error, usage, model, messages, - response_obj, user_id, time, print_verbose): + def log_event( + self, + type, + run_id, + model, + print_verbose, + messages=None, + user_id=None, + response_obj=None, + time=datetime.datetime.now(), + error=None, + ): # Method definition try: print_verbose( f"LLMonitor Logging - Enters logging function for model {model}" ) - print(type, model, messages, response_obj, time, end_user) + if response_obj: + usage = parse_usage(response_obj['usage']) + output = response_obj['choices'] + else: + usage = None + output = None + + print(type, run_id, model, messages, usage, output, time, user_id, + error) headers = {'Content-Type': 'application/json'} @@ -38,8 +87,9 @@ class LLMonitorLogger: "event": type, "timestamp": time.isoformat(), "userId": user_id, - "input": messages, - "output": response_obj['choices'][0]['message']['content'], + "input": parse_messages(messages), + "usage": usage, + "output": parse_messages(output), } print_verbose(f"LLMonitor Logging - final data object: {data}") diff --git a/litellm/tests/test_llmonitor_integration.py b/litellm/tests/test_llmonitor_integration.py index d2045e5dc83..0fecac056e5 100644 --- a/litellm/tests/test_llmonitor_integration.py +++ b/litellm/tests/test_llmonitor_integration.py @@ -15,12 +15,21 @@ litellm.error_callback = ["llmonitor"] litellm.set_verbose = True -# openai call +os.environ[ + "OPENAI_API_KEY"] = "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" + +print(os.environ["OPENAI_API_KEY"]) + +# def my_custom_logging_fn(model_call_dict): +# print(f"model call details: {model_call_dict}") + +# # openai call # response = completion(model="gpt-3.5-turbo", # messages=[{ # "role": "user", # "content": "Hi 👋 - i'm openai" -# }]) +# }], +# logger_fn=my_custom_logging_fn) # print(response) diff --git a/litellm/utils.py b/litellm/utils.py index c451095b8fb..2ac99ccafc8 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -986,7 +986,6 @@ def handle_success(args, kwargs, result, start_time, end_time): print_verbose("reaches llmonitor for logging!") model = args[0] if len(args) > 0 else kwargs["model"] messages = args[1] if len(args) > 1 else kwargs["messages"] - usage = kwargs["usage"] llmonitorLogger.log_event( type="end", model=model, @@ -994,7 +993,6 @@ def handle_success(args, kwargs, result, start_time, end_time): user_id=litellm._thread_context.user, response_obj=result, time=end_time, - usage=usage, run_id=kwargs["litellm_call_id"], print_verbose=print_verbose, ) From 61afceece1e3509a868e11258271020f96eb815d Mon Sep 17 00:00:00 2001 From: Vince Lwt Date: Mon, 21 Aug 2023 21:31:09 +0200 Subject: [PATCH 005/174] fix error tracking --- .../observability/llmonitor_integration.md | 11 ++--- litellm/integrations/llmonitor.py | 42 ++++++++++++------- litellm/tests/test_llmonitor_integration.py | 37 ++++------------ litellm/utils.py | 31 ++++---------- 4 files changed, 50 insertions(+), 71 deletions(-) diff --git a/docs/my-website/docs/observability/llmonitor_integration.md b/docs/my-website/docs/observability/llmonitor_integration.md index f263050440d..2d018c2667c 100644 --- a/docs/my-website/docs/observability/llmonitor_integration.md +++ b/docs/my-website/docs/observability/llmonitor_integration.md @@ -4,15 +4,16 @@ ## Use LLMonitor to log requests across all LLM Providers (OpenAI, Azure, Anthropic, Cohere, Replicate, PaLM) -liteLLM provides `success_callbacks` and `failure_callbacks`, making it easy for you to send data to a particular provider depending on the status of your responses. +liteLLM provides `callbacks`, making it easy for you to log data depending on the status of your responses. ### Using Callbacks Use just 2 lines of code, to instantly log your responses **across all providers** with llmonitor: ``` -litellm.success_callback=["llmonitor"] -litellm.error_callback=["llmonitor"] +litellm.success_callback = ["llmonitor"] +litellm.failure_callback = ["llmonitor"] + ``` Complete code @@ -27,8 +28,8 @@ os.environ["LLMONITOR_APP_ID"] = "your-llmonitor-app-id" os.environ["OPENAI_API_KEY"], os.environ["COHERE_API_KEY"] = "", "" # set callbacks -litellm.success_callback=["llmonitor"] -litellm.error_callback=["llmonitor"] +litellm.success_callback = ["llmonitor"] +litellm.failure_callback = ["llmonitor"] #openai call response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}]) diff --git a/litellm/integrations/llmonitor.py b/litellm/integrations/llmonitor.py index 6fa208f9958..4728f249f34 100644 --- a/litellm/integrations/llmonitor.py +++ b/litellm/integrations/llmonitor.py @@ -57,14 +57,14 @@ class LLMonitorLogger: messages=None, user_id=None, response_obj=None, - time=datetime.datetime.now(), + start_time=datetime.datetime.now(), + end_time=datetime.datetime.now(), error=None, ): # Method definition try: print_verbose( - f"LLMonitor Logging - Enters logging function for model {model}" - ) + f"LLMonitor Logging - Logging request for model {model}") if response_obj: usage = parse_usage(response_obj['usage']) @@ -73,27 +73,41 @@ class LLMonitorLogger: usage = None output = None - print(type, run_id, model, messages, usage, output, time, user_id, - error) + if error: + error_obj = {'stack': error} - headers = {'Content-Type': 'application/json'} + else: + error_obj = None - data = { + data = [{ "type": "llm", "name": model, "runId": run_id, "app": self.app_id, - "error": error, - "event": type, - "timestamp": time.isoformat(), + 'event': 'start', + "timestamp": start_time.isoformat(), "userId": user_id, "input": parse_messages(messages), - "usage": usage, + }, { + "type": "llm", + "runId": run_id, + "app": self.app_id, + "event": type, + "error": error_obj, + "timestamp": end_time.isoformat(), + "userId": user_id, "output": parse_messages(output), - } + "tokensUsage": usage, + }] - print_verbose(f"LLMonitor Logging - final data object: {data}") - # response = requests.post(url, headers=headers, json=data) + # print_verbose(f"LLMonitor Logging - final data object: {data}") + + response = requests.post( + self.api_url + '/api/report', + headers={'Content-Type': 'application/json'}, + json={'events': data}) + + print_verbose(f"LLMonitor Logging - response: {response}") except: # traceback.print_exc() print_verbose( diff --git a/litellm/tests/test_llmonitor_integration.py b/litellm/tests/test_llmonitor_integration.py index 0fecac056e5..32e319cc33e 100644 --- a/litellm/tests/test_llmonitor_integration.py +++ b/litellm/tests/test_llmonitor_integration.py @@ -9,37 +9,16 @@ sys.path.insert(0, os.path.abspath('../..')) from litellm import completion import litellm -litellm.input_callback = ["llmonitor"] litellm.success_callback = ["llmonitor"] -litellm.error_callback = ["llmonitor"] +litellm.failure_callback = ["llmonitor"] litellm.set_verbose = True -os.environ[ - "OPENAI_API_KEY"] = "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" +# openai call +first_success_test = completion(model="gpt-3.5-turbo", + messages=[{ + "role": "user", + "content": "Hi 👋 - i'm openai" + }]) -print(os.environ["OPENAI_API_KEY"]) - -# def my_custom_logging_fn(model_call_dict): -# print(f"model call details: {model_call_dict}") - -# # openai call -# response = completion(model="gpt-3.5-turbo", -# messages=[{ -# "role": "user", -# "content": "Hi 👋 - i'm openai" -# }], -# logger_fn=my_custom_logging_fn) - -# print(response) - -# #bad request call -# response = completion(model="chatgpt-test", messages=[{"role": "user", "content": "Hi 👋 - i'm a bad request"}]) - -# cohere call -response = completion(model="command-nightly", - messages=[{ - "role": "user", - "content": "Hi 👋 - i'm cohere" - }]) -print(response) +print(first_success_test) diff --git a/litellm/utils.py b/litellm/utils.py index 2ac99ccafc8..a6735586c83 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -209,19 +209,7 @@ class Logging: litellm_params["litellm_call_id"], print_verbose=print_verbose, ) - elif callback == "llmonitor": - print_verbose("reaches llmonitor for logging!") - model = self.model - messages = self.messages - print(f"liteDebuggerClient: {liteDebuggerClient}") - llmonitorLogger.log_event( - type="start", - model=model, - messages=messages, - user_id=litellm._thread_context.user, - run_id=self.litellm_params["litellm_call_id"], - print_verbose=print_verbose, - ) + elif callback == "lite_debugger": print_verbose("reaches litedebugger for logging!") model = self.model @@ -426,6 +414,7 @@ def client(original_function): add_cache(result, *args, **kwargs) # LOG SUCCESS crash_reporting(*args, **kwargs) + my_thread = threading.Thread( target=handle_success, args=(args, kwargs, result, start_time, @@ -433,6 +422,7 @@ def client(original_function): my_thread.start() return result except Exception as e: + traceback_exception = traceback.format_exc() crash_reporting(*args, **kwargs, exception=traceback_exception) end_time = datetime.datetime.now() @@ -855,21 +845,15 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, print_verbose("reaches llmonitor for logging!") model = args[0] if len(args) > 0 else kwargs["model"] messages = args[1] if len(args) > 1 else kwargs["messages"] - usage = { - "prompt_tokens": - prompt_token_calculator(model, messages=messages), - "completion_tokens": - 0, - } + llmonitorLogger.log_event( type="error", user_id=litellm._thread_context.user, model=model, error=traceback_exception, - response_obj=result, run_id=kwargs["litellm_call_id"], - timestamp=end_time, - usage=usage, + start_time=start_time, + end_time=end_time, print_verbose=print_verbose, ) elif callback == "supabase": @@ -992,7 +976,8 @@ def handle_success(args, kwargs, result, start_time, end_time): messages=messages, user_id=litellm._thread_context.user, response_obj=result, - time=end_time, + start_time=start_time, + end_time=end_time, run_id=kwargs["litellm_call_id"], print_verbose=print_verbose, ) From 342b83544f5e1455fc99049935fc01dfc8bf8a0d Mon Sep 17 00:00:00 2001 From: Vince Lwt Date: Mon, 21 Aug 2023 21:38:44 +0200 Subject: [PATCH 006/174] add missing references --- .../docs/observability/callbacks.md | 2 +- docs/my-website/sidebars.js | 54 +++++++++++-------- .../src/pages/observability/callbacks.md | 19 +++---- .../src/pages/observability/integrations.md | 17 +++--- mkdocs.yml | 1 + proxy-server/readme.md | 2 +- 6 files changed, 52 insertions(+), 43 deletions(-) diff --git a/docs/my-website/docs/observability/callbacks.md b/docs/my-website/docs/observability/callbacks.md index 74641f147c0..4f9e91944c5 100644 --- a/docs/my-website/docs/observability/callbacks.md +++ b/docs/my-website/docs/observability/callbacks.md @@ -6,8 +6,8 @@ liteLLM provides `success_callbacks` and `failure_callbacks`, making it easy for liteLLM supports: -- [Helicone](https://docs.helicone.ai/introduction) - [LLMonitor](https://llmonitor.com/docs) +- [Helicone](https://docs.helicone.ai/introduction) - [Sentry](https://docs.sentry.io/platforms/python/) - [PostHog](https://posthog.com/docs/libraries/python) - [Slack](https://slack.dev/bolt-python/concepts) diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index 53735fbf3b1..e37da776a9f 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -17,36 +17,46 @@ const sidebars = { // But you can create a sidebar manually tutorialSidebar: [ - { type: "doc", id: "index" }, // NEW + { type: "doc", id: "index" }, // NEW { - type: 'category', - label: 'Completion()', - items: ['completion/input','completion/output'], + type: "category", + label: "Completion()", + items: ["completion/input", "completion/output"], }, { - type: 'category', - label: 'Embedding()', - items: ['embedding/supported_embedding'], + type: "category", + label: "Embedding()", + items: ["embedding/supported_embedding"], }, - 'debugging/local_debugging', - 'completion/supported', + "debugging/local_debugging", + "completion/supported", { - type: 'category', - label: 'Tutorials', - items: ['tutorials/huggingface_tutorial', 'tutorials/TogetherAI_liteLLM', 'tutorials/debugging_tutorial'], + type: "category", + label: "Tutorials", + items: [ + "tutorials/huggingface_tutorial", + "tutorials/TogetherAI_liteLLM", + "tutorials/debugging_tutorial", + ], }, - 'token_usage', - 'stream', - 'secret', - 'caching', + "token_usage", + "stream", + "secret", + "caching", { - type: 'category', - label: 'Logging & Observability', - items: ['observability/callbacks', 'observability/integrations', 'observability/helicone_integration', 'observability/supabase_integration'], + type: "category", + label: "Logging & Observability", + items: [ + "observability/callbacks", + "observability/integrations", + "observability/llmonitor_integration", + "observability/helicone_integration", + "observability/supabase_integration", + ], }, - 'troubleshoot', - 'contributing', - 'contact' + "troubleshoot", + "contributing", + "contact", ], }; diff --git a/docs/my-website/src/pages/observability/callbacks.md b/docs/my-website/src/pages/observability/callbacks.md index 7ac67b30df4..323d7358026 100644 --- a/docs/my-website/src/pages/observability/callbacks.md +++ b/docs/my-website/src/pages/observability/callbacks.md @@ -1,29 +1,30 @@ # Callbacks ## Use Callbacks to send Output Data to Posthog, Sentry etc -liteLLM provides `success_callbacks` and `failure_callbacks`, making it easy for you to send data to a particular provider depending on the status of your responses. -liteLLM supports: +liteLLM provides `success_callbacks` and `failure_callbacks`, making it easy for you to send data to a particular provider depending on the status of your responses. +liteLLM supports: + +- [LLMonitor](https://llmonitor.com/docs) - [Helicone](https://docs.helicone.ai/introduction) -- [Sentry](https://docs.sentry.io/platforms/python/) +- [Sentry](https://docs.sentry.io/platforms/python/) - [PostHog](https://posthog.com/docs/libraries/python) - [Slack](https://slack.dev/bolt-python/concepts) ### Quick Start + ```python from litellm import completion # set callbacks -litellm.success_callback=["posthog", "helicone"] -litellm.failure_callback=["sentry"] +litellm.success_callback=["posthog", "helicone", "llmonitor"] +litellm.failure_callback=["sentry", "llmonitor"] ## set env variables os.environ['SENTRY_API_URL'], os.environ['SENTRY_API_TRACE_RATE']= "" os.environ['POSTHOG_API_KEY'], os.environ['POSTHOG_API_URL'] = "api-key", "api-url" -os.environ["HELICONE_API_KEY"] = "" +os.environ["HELICONE_API_KEY"] = "" -response = completion(model="gpt-3.5-turbo", messages=messages) +response = completion(model="gpt-3.5-turbo", messages=messages) ``` - - diff --git a/docs/my-website/src/pages/observability/integrations.md b/docs/my-website/src/pages/observability/integrations.md index 6b6d535befa..ba586247832 100644 --- a/docs/my-website/src/pages/observability/integrations.md +++ b/docs/my-website/src/pages/observability/integrations.md @@ -1,12 +1,9 @@ # Logging Integrations -| Integration | Required OS Variables | How to Use with callbacks | -|-----------------|--------------------------------------------|-------------------------------------------| -| Sentry | `SENTRY_API_URL` | `litellm.success_callback=["sentry"]` | -| Posthog | `POSTHOG_API_KEY`,`POSTHOG_API_URL` | `litellm.success_callback=["posthog"]` | -| Slack | `SLACK_API_TOKEN`,`SLACK_API_SECRET`,`SLACK_API_CHANNEL` | `litellm.success_callback=["slack"]` | -| Helicone | `HELICONE_API_TOKEN` | `litellm.success_callback=["helicone"]` | - - - - +| Integration | Required OS Variables | How to Use with callbacks | +| ----------- | -------------------------------------------------------- | ---------------------------------------- | +| LLMonitor | `LLMONITOR_APP_ID` | `litellm.success_callback=["llmonitor"]` | +| Sentry | `SENTRY_API_URL` | `litellm.success_callback=["sentry"]` | +| Posthog | `POSTHOG_API_KEY`,`POSTHOG_API_URL` | `litellm.success_callback=["posthog"]` | +| Slack | `SLACK_API_TOKEN`,`SLACK_API_SECRET`,`SLACK_API_CHANNEL` | `litellm.success_callback=["slack"]` | +| Helicone | `HELICONE_API_TOKEN` | `litellm.success_callback=["helicone"]` | diff --git a/mkdocs.yml b/mkdocs.yml index 97ed0d9ed84..b3c88c74139 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -16,6 +16,7 @@ nav: - 💾 Callbacks - Logging Output: - Quick Start: advanced.md - Output Integrations: client_integrations.md + - LLMonitor Tutorial: llmonitor_integration.md - Helicone Tutorial: helicone_integration.md - Supabase Tutorial: supabase_integration.md - BerriSpend Tutorial: berrispend_integration.md diff --git a/proxy-server/readme.md b/proxy-server/readme.md index edd03de3fd3..9c3c1393447 100644 --- a/proxy-server/readme.md +++ b/proxy-server/readme.md @@ -33,7 +33,7 @@ - Call all models using the OpenAI format - `completion(model, messages)` - Text responses will always be available at `['choices'][0]['message']['content']` - **Error Handling** Using Model Fallbacks (if `GPT-4` fails, try `llama2`) -- **Logging** - Log Requests, Responses and Errors to `Supabase`, `Posthog`, `Mixpanel`, `Sentry`, `Helicone`, `LLMonitor` (Any of the supported providers here: https://litellm.readthedocs.io/en/latest/advanced/ +- **Logging** - Log Requests, Responses and Errors to `Supabase`, `Posthog`, `Mixpanel`, `Sentry`, `LLMonitor`, `Helicone` (Any of the supported providers here: https://litellm.readthedocs.io/en/latest/advanced/ **Example: Logs sent to Supabase** Screenshot 2023-08-11 at 4 02 46 PM From 0cb4816ab2eee884087c903ae19f0887a348402e Mon Sep 17 00:00:00 2001 From: Vince Lwt Date: Tue, 22 Aug 2023 15:42:56 +0200 Subject: [PATCH 007/174] support for later embeddings --- litellm/integrations/llmonitor.py | 30 ++++++++++++++------- litellm/tests/test_llmonitor_integration.py | 27 ++++++++++++++----- litellm/utils.py | 26 +++++++++++++----- 3 files changed, 61 insertions(+), 22 deletions(-) diff --git a/litellm/integrations/llmonitor.py b/litellm/integrations/llmonitor.py index 4728f249f34..b154eefea81 100644 --- a/litellm/integrations/llmonitor.py +++ b/litellm/integrations/llmonitor.py @@ -12,8 +12,10 @@ dotenv.load_dotenv() # Loading env variables using dotenv # convert to {completion: xx, tokens: xx} def parse_usage(usage): return { - "completion": usage["completion_tokens"], - "prompt": usage["prompt_tokens"], + "completion": + usage["completion_tokens"] if "completion_tokens" in usage else 0, + "prompt": + usage["prompt_tokens"] if "prompt_tokens" in usage else 0, } @@ -23,6 +25,10 @@ def parse_messages(input): return None def clean_message(message): + #if is strin, return as is + if isinstance(message, str): + return message + if "message" in message: return clean_message(message["message"]) @@ -51,10 +57,11 @@ class LLMonitorLogger: def log_event( self, type, + event, run_id, model, print_verbose, - messages=None, + input=None, user_id=None, response_obj=None, start_time=datetime.datetime.now(), @@ -67,8 +74,11 @@ class LLMonitorLogger: f"LLMonitor Logging - Logging request for model {model}") if response_obj: - usage = parse_usage(response_obj['usage']) - output = response_obj['choices'] + print(response_obj) + usage = parse_usage( + response_obj['usage']) if 'usage' in response_obj else None + output = response_obj[ + 'choices'] if 'choices' in response_obj else None else: usage = None output = None @@ -80,19 +90,19 @@ class LLMonitorLogger: error_obj = None data = [{ - "type": "llm", + "type": type, "name": model, "runId": run_id, "app": self.app_id, 'event': 'start', "timestamp": start_time.isoformat(), "userId": user_id, - "input": parse_messages(messages), + "input": parse_messages(input), }, { - "type": "llm", + "type": type, "runId": run_id, "app": self.app_id, - "event": type, + "event": event, "error": error_obj, "timestamp": end_time.isoformat(), "userId": user_id, @@ -100,6 +110,8 @@ class LLMonitorLogger: "tokensUsage": usage, }] + print(data) + # print_verbose(f"LLMonitor Logging - final data object: {data}") response = requests.post( diff --git a/litellm/tests/test_llmonitor_integration.py b/litellm/tests/test_llmonitor_integration.py index 32e319cc33e..d0abb7d6b0e 100644 --- a/litellm/tests/test_llmonitor_integration.py +++ b/litellm/tests/test_llmonitor_integration.py @@ -6,7 +6,7 @@ import os sys.path.insert(0, os.path.abspath('../..')) -from litellm import completion +from litellm import completion, embedding import litellm litellm.success_callback = ["llmonitor"] @@ -15,10 +15,23 @@ litellm.failure_callback = ["llmonitor"] litellm.set_verbose = True # openai call -first_success_test = completion(model="gpt-3.5-turbo", - messages=[{ - "role": "user", - "content": "Hi 👋 - i'm openai" - }]) +# first_success_test = completion(model="gpt-3.5-turbo", +# messages=[{ +# "role": "user", +# "content": "Hi 👋 - i'm openai" +# }]) -print(first_success_test) +# print(first_success_test) + + +def test_embedding_openai(): + try: + response = embedding(model="text-embedding-ada-002", input=['test']) + # Add any assertions here to check the response + print(f"response: {str(response)[:50]}") + except Exception as e: + print(e) + # pytest.fail(f"Error occurred: {e}") + + +test_embedding_openai() \ No newline at end of file diff --git a/litellm/utils.py b/litellm/utils.py index a6735586c83..f8895c5233a 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -842,14 +842,21 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, print_verbose=print_verbose, ) elif callback == "llmonitor": - print_verbose("reaches llmonitor for logging!") + print_verbose("reaches llmonitor for logging error!") + model = args[0] if len(args) > 0 else kwargs["model"] - messages = args[1] if len(args) > 1 else kwargs["messages"] + + input = args[1] if len(args) > 1 else kwargs.get( + "messages", kwargs.get("input", None)) + + type = 'embed' if 'input' in kwargs else 'llm' llmonitorLogger.log_event( - type="error", + type=type, + event="error", user_id=litellm._thread_context.user, model=model, + input=input, error=traceback_exception, run_id=kwargs["litellm_call_id"], start_time=start_time, @@ -969,11 +976,18 @@ def handle_success(args, kwargs, result, start_time, end_time): elif callback == "llmonitor": print_verbose("reaches llmonitor for logging!") model = args[0] if len(args) > 0 else kwargs["model"] - messages = args[1] if len(args) > 1 else kwargs["messages"] + + input = args[1] if len(args) > 1 else kwargs.get( + "messages", kwargs.get("input", None)) + + #if contains input, it's 'embedding', otherwise 'llm' + type = 'embed' if 'input' in kwargs else 'llm' + llmonitorLogger.log_event( - type="end", + type=type, + event="end", model=model, - messages=messages, + input=input, user_id=litellm._thread_context.user, response_obj=result, start_time=start_time, From fd9c9227b633318fd2f052e48a26c1cbded00e77 Mon Sep 17 00:00:00 2001 From: Vince Lwt Date: Tue, 22 Aug 2023 15:48:43 +0200 Subject: [PATCH 008/174] clean --- litellm/integrations/llmonitor.py | 3 --- litellm/tests/test_llmonitor_integration.py | 21 +++++++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/litellm/integrations/llmonitor.py b/litellm/integrations/llmonitor.py index b154eefea81..d166e18880c 100644 --- a/litellm/integrations/llmonitor.py +++ b/litellm/integrations/llmonitor.py @@ -74,7 +74,6 @@ class LLMonitorLogger: f"LLMonitor Logging - Logging request for model {model}") if response_obj: - print(response_obj) usage = parse_usage( response_obj['usage']) if 'usage' in response_obj else None output = response_obj[ @@ -110,8 +109,6 @@ class LLMonitorLogger: "tokensUsage": usage, }] - print(data) - # print_verbose(f"LLMonitor Logging - final data object: {data}") response = requests.post( diff --git a/litellm/tests/test_llmonitor_integration.py b/litellm/tests/test_llmonitor_integration.py index d0abb7d6b0e..35970195852 100644 --- a/litellm/tests/test_llmonitor_integration.py +++ b/litellm/tests/test_llmonitor_integration.py @@ -14,14 +14,19 @@ litellm.failure_callback = ["llmonitor"] litellm.set_verbose = True -# openai call -# first_success_test = completion(model="gpt-3.5-turbo", -# messages=[{ -# "role": "user", -# "content": "Hi 👋 - i'm openai" -# }]) -# print(first_success_test) +def test_chat_openai(): + try: + response = completion(model="gpt-3.5-turbo", + messages=[{ + "role": "user", + "content": "Hi 👋 - i'm openai" + }]) + + print(response) + + except Exception as e: + print(e) def test_embedding_openai(): @@ -31,7 +36,7 @@ def test_embedding_openai(): print(f"response: {str(response)[:50]}") except Exception as e: print(e) - # pytest.fail(f"Error occurred: {e}") +test_chat_openai() test_embedding_openai() \ No newline at end of file From 7690f26ef1311b786bba942656dc6bcab886d9cc Mon Sep 17 00:00:00 2001 From: nandini bagga Date: Wed, 23 Aug 2023 16:04:05 +0530 Subject: [PATCH 009/174] added lunr search bar in docs --- docs/my-website/docusaurus.config.js | 3 + docs/my-website/package.json | 1 + docs/my-website/yarn.lock | 728 ++++++++++++++++----------- 3 files changed, 442 insertions(+), 290 deletions(-) diff --git a/docs/my-website/docusaurus.config.js b/docs/my-website/docusaurus.config.js index 8c63edf0c0b..d1ada53bdbc 100644 --- a/docs/my-website/docusaurus.config.js +++ b/docs/my-website/docusaurus.config.js @@ -38,6 +38,9 @@ const config = { disableInDev: false, }, ], + [ require.resolve('docusaurus-lunr-search'), { + languages: ['en'] // language codes + }] ], presets: [ diff --git a/docs/my-website/package.json b/docs/my-website/package.json index 13af0f9885b..7c855b8bf79 100644 --- a/docs/my-website/package.json +++ b/docs/my-website/package.json @@ -19,6 +19,7 @@ "@docusaurus/preset-classic": "2.4.1", "@mdx-js/react": "^1.6.22", "clsx": "^1.2.1", + "docusaurus-lunr-search": "^2.4.1", "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/docs/my-website/yarn.lock b/docs/my-website/yarn.lock index e0a4c1d2787..7b7fac09ae3 100644 --- a/docs/my-website/yarn.lock +++ b/docs/my-website/yarn.lock @@ -84,7 +84,7 @@ "@algolia/requester-common" "4.19.1" "@algolia/transporter" "4.19.1" -"@algolia/client-search@>= 4.9.1 < 6", "@algolia/client-search@4.19.1": +"@algolia/client-search@4.19.1": version "4.19.1" resolved "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.19.1.tgz" integrity sha512-mBecfMFS4N+yK/p0ZbK53vrZbL6OtWMk8YmnOv1i0LXx4pelY8TFhqKoTit3NPVPwoSNN0vdSN9dTu1xr1XOVw== @@ -159,27 +159,6 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz" integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== -"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.0.0-0 || ^8.0.0-0 <8.0.0", "@babel/core@^7.11.6", "@babel/core@^7.12.0", "@babel/core@^7.13.0", "@babel/core@^7.18.6", "@babel/core@^7.19.6", "@babel/core@^7.4.0 || ^8.0.0-0 <8.0.0": - version "7.22.10" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz" - integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.10" - "@babel/generator" "^7.22.10" - "@babel/helper-compilation-targets" "^7.22.10" - "@babel/helper-module-transforms" "^7.22.9" - "@babel/helpers" "^7.22.10" - "@babel/parser" "^7.22.10" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.10" - "@babel/types" "^7.22.10" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.1" - "@babel/core@7.12.9": version "7.12.9" resolved "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz" @@ -202,6 +181,27 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/core@^7.18.6", "@babel/core@^7.19.6": + version "7.22.10" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz" + integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-compilation-targets" "^7.22.10" + "@babel/helper-module-transforms" "^7.22.9" + "@babel/helpers" "^7.22.10" + "@babel/parser" "^7.22.10" + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.2" + semver "^6.3.1" + "@babel/generator@^7.12.5", "@babel/generator@^7.18.7", "@babel/generator@^7.22.10": version "7.22.10" resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz" @@ -324,16 +324,16 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz" - integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== - "@babel/helper-plugin-utils@7.10.4": version "7.10.4" resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz" + integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== + "@babel/helper-remap-async-to-generator@^7.22.5", "@babel/helper-remap-async-to-generator@^7.22.9": version "7.22.9" resolved "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.9.tgz" @@ -513,13 +513,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz" - integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/plugin-syntax-jsx@7.12.1": version "7.12.1" resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz" @@ -527,6 +520,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-syntax-jsx@^7.22.5": + version "7.22.5" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz" + integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" @@ -548,7 +548,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-object-rest-spread@^7.8.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3", "@babel/plugin-syntax-object-rest-spread@7.8.3": +"@babel/plugin-syntax-object-rest-spread@7.8.3", "@babel/plugin-syntax-object-rest-spread@^7.8.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== @@ -1539,7 +1539,7 @@ "@docusaurus/theme-search-algolia" "2.4.1" "@docusaurus/types" "2.4.1" -"@docusaurus/react-loadable@5.5.2": +"@docusaurus/react-loadable@5.5.2", "react-loadable@npm:@docusaurus/react-loadable@5.5.2": version "5.5.2" resolved "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz" integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ== @@ -1637,7 +1637,7 @@ fs-extra "^10.1.0" tslib "^2.4.0" -"@docusaurus/types@*", "@docusaurus/types@2.4.1": +"@docusaurus/types@2.4.1": version "2.4.1" resolved "https://registry.npmjs.org/@docusaurus/types/-/types-2.4.1.tgz" integrity sha512-0R+cbhpMkhbRXX138UOc/2XZFF8hiZa6ooZAEEJFp5scytzCw4tC1gChMFXrpa3d2tYE6AX8IrOEpSonLmfQuQ== @@ -1815,7 +1815,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -1923,7 +1923,7 @@ "@svgr/babel-plugin-transform-react-native-svg" "^6.5.1" "@svgr/babel-plugin-transform-svg-component" "^6.5.1" -"@svgr/core@*", "@svgr/core@^6.0.0", "@svgr/core@^6.5.1": +"@svgr/core@^6.5.1": version "6.5.1" resolved "https://registry.npmjs.org/@svgr/core/-/core-6.5.1.tgz" integrity sha512-/xdLSWxK5QkqG524ONSjvg3V/FkNyCv538OIBdQqPNaAta3AsXj/Bd2FbvR87yMbXO2hFSWiAe/Q6IkVPDw+mw== @@ -2184,7 +2184,7 @@ "@types/history" "^4.7.11" "@types/react" "*" -"@types/react@*", "@types/react@>= 16.8.0 < 19.0.0": +"@types/react@*": version "18.2.20" resolved "https://registry.npmjs.org/@types/react/-/react-18.2.20.tgz" integrity sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw== @@ -2265,7 +2265,7 @@ dependencies: "@types/yargs-parser" "*" -"@webassemblyjs/ast@^1.11.5", "@webassemblyjs/ast@1.11.6": +"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": version "1.11.6" resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz" integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== @@ -2366,7 +2366,7 @@ "@webassemblyjs/wasm-gen" "1.11.6" "@webassemblyjs/wasm-parser" "1.11.6" -"@webassemblyjs/wasm-parser@^1.11.5", "@webassemblyjs/wasm-parser@1.11.6": +"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": version "1.11.6" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz" integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== @@ -2396,6 +2396,11 @@ resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: version "1.3.8" resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" @@ -2414,7 +2419,7 @@ acorn-walk@^8.0.0: resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8, acorn@^8.0.4, acorn@^8.7.1, acorn@^8.8.2: +acorn@^8.0.4, acorn@^8.7.1, acorn@^8.8.2: version "8.10.0" resolved "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== @@ -2451,7 +2456,7 @@ ajv-keywords@^5.1.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: +ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2461,17 +2466,7 @@ ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0: - version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ajv@^8.8.2, ajv@^8.9.0: +ajv@^8.0.0, ajv@^8.9.0: version "8.12.0" resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -2488,7 +2483,7 @@ algoliasearch-helper@^3.10.0: dependencies: "@algolia/events" "^4.0.1" -algoliasearch@^4.0.0, algoliasearch@^4.13.1, "algoliasearch@>= 3.1 < 6", "algoliasearch@>= 4.9.1 < 6": +algoliasearch@^4.0.0, algoliasearch@^4.13.1: version "4.19.1" resolved "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.19.1.tgz" integrity sha512-IJF5b93b2MgAzcE/tuzW0yOPnuUyRgGAtaPv5UUywXM8kzqfdwZTO4sPJBzoGz1eOy6H9uEchsJsBFTELZSu+g== @@ -2557,6 +2552,11 @@ anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +"aproba@^1.0.3 || ^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== + arg@^5.0.0: version "5.0.2" resolved "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz" @@ -2574,16 +2574,16 @@ argparse@^2.0.1: resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array-flatten@^2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz" - integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== - array-flatten@1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== +array-flatten@^2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz" + integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== + array-union@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" @@ -2599,6 +2599,13 @@ at-least-node@^1.0.0: resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== +autocomplete.js@^0.37.0: + version "0.37.1" + resolved "https://registry.yarnpkg.com/autocomplete.js/-/autocomplete.js-0.37.1.tgz#a29a048d827e7d2bf8f7df8b831766e5cc97df01" + integrity sha512-PgSe9fHYhZEsm/9jggbjtVsGXJkPLvd+9mC7gZJ662vVL5CRWEtm/mIrrzCx0MrNxHVwxD5d00UOn6NsmL2LUQ== + dependencies: + immediate "^3.2.3" + autoprefixer@^10.4.12, autoprefixer@^10.4.7: version "10.4.14" resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz" @@ -2618,6 +2625,11 @@ axios@^0.25.0: dependencies: follow-redirects "^1.14.7" +b4a@^1.6.4: + version "1.6.4" + resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.4.tgz#ef1c1422cae5ce6535ec191baeed7567443f36c9" + integrity sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw== + babel-loader@^8.2.5: version "8.3.0" resolved "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz" @@ -2699,6 +2711,11 @@ batch@0.6.1: resolved "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz" integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== +bcp-47-match@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/bcp-47-match/-/bcp-47-match-1.0.3.tgz#cb8d03071389a10aff2062b862d6575ffd7cd7ef" + integrity sha512-LggQ4YTdjWQSKELZF5JwchnBa1u0pIQSZf5lSdOHEdbVP55h0qICA/FUp3+W99q0xqxYa1ZQizTUH87gecII5w== + big.js@^5.2.2: version "5.2.2" resolved "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz" @@ -2794,7 +2811,7 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.4, browserslist@^4.21.5, browserslist@^4.21.9, "browserslist@>= 4.21.0": +browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.4, browserslist@^4.21.5, browserslist@^4.21.9: version "4.21.10" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz" integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ== @@ -3054,16 +3071,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@^1.0.0, color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - color-name@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== +color-name@^1.0.0, color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + color-string@^1.9.0: version "1.9.1" resolved "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz" @@ -3072,6 +3089,11 @@ color-string@^1.9.0: color-name "^1.0.0" simple-swizzle "^0.2.2" +color-support@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + color@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/color/-/color-4.2.3.tgz" @@ -3172,6 +3194,11 @@ consola@^2.15.3: resolved "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz" integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== +console-control-strings@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== + "consolidated-events@^1.1.0 || ^2.0.0": version "2.0.2" resolved "https://registry.npmjs.org/consolidated-events/-/consolidated-events-2.0.2.tgz" @@ -3354,6 +3381,11 @@ css-select@^5.1.0: domutils "^3.0.1" nth-check "^2.0.1" +css-selector-parser@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/css-selector-parser/-/css-selector-parser-1.4.1.tgz#03f9cb8a81c3e5ab2c51684557d5aaf6d2569759" + integrity sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g== + css-tree@^1.1.2, css-tree@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz" @@ -3445,27 +3477,20 @@ csstype@^3.0.2: resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== -debug@^2.6.0: +debug@2.6.9, debug@^2.6.0: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@^4.1.0, debug@^4.1.1, debug@4: +debug@4, debug@^4.1.0, debug@^4.1.1: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@2.6.9: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz" @@ -3529,16 +3554,16 @@ del@^6.1.1: rimraf "^3.0.2" slash "^3.0.0" -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" - integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== - depd@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" + integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== + destroy@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" @@ -3551,7 +3576,7 @@ detab@2.0.4: dependencies: repeat-string "^1.5.4" -detect-libc@^2.0.0, detect-libc@^2.0.1: +detect-libc@^2.0.0, detect-libc@^2.0.1, detect-libc@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz" integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== @@ -3584,6 +3609,11 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +direction@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/direction/-/direction-1.0.4.tgz#2b86fb686967e987088caf8b89059370d4837442" + integrity sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ== + dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz" @@ -3596,6 +3626,26 @@ dns-packet@^5.2.2: dependencies: "@leichtgewicht/ip-codec" "^2.0.1" +docusaurus-lunr-search@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/docusaurus-lunr-search/-/docusaurus-lunr-search-2.4.1.tgz#73419d4700cd69e3521525b20494fb31ba12b6c4" + integrity sha512-UOgaAypgO0iLyA1Hk4EThG/ofLm9/JldznzN98ZKr7TMYVjMZbAEaIBKLAUDFdfOPr9D5EswXdLn39/aRkwHMA== + dependencies: + autocomplete.js "^0.37.0" + clsx "^1.2.1" + gauge "^3.0.0" + hast-util-select "^4.0.0" + hast-util-to-text "^2.0.0" + hogan.js "^3.0.2" + lunr "^2.3.8" + lunr-languages "^1.4.0" + minimatch "^3.0.4" + object-assign "^4.1.1" + rehype-parse "^7.0.1" + to-vfile "^6.1.0" + unified "^9.0.0" + unist-util-is "^4.0.2" + dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz" @@ -3673,16 +3723,16 @@ dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" -duplexer@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - duplexer3@^0.1.4: version "0.1.5" resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz" integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA== +duplexer@^0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== + eastasianwidth@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz" @@ -3922,6 +3972,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-fifo@^1.1.0, fast-fifo@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" + integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== + fast-glob@^3.2.11, fast-glob@^3.2.9, fast-glob@^3.3.0: version "3.3.1" resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz" @@ -3991,7 +4046,7 @@ feed@^4.2.2: dependencies: xml-js "^1.6.11" -file-loader@*, file-loader@^6.2.0: +file-loader@^6.2.0: version "6.2.0" resolved "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz" integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw== @@ -4147,6 +4202,21 @@ function-bind@^1.1.1: resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +gauge@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" + integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" + has-unicode "^2.0.1" + object-assign "^4.1.1" + signal-exit "^3.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.2" + gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" @@ -4349,6 +4419,11 @@ has-symbols@^1.0.3: resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-unicode@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== + has-yarn@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz" @@ -4386,6 +4461,16 @@ hast-util-from-parse5@^6.0.0: vfile-location "^3.2.0" web-namespaces "^1.0.0" +hast-util-has-property@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/hast-util-has-property/-/hast-util-has-property-1.0.4.tgz#9f137565fad6082524b382c1e7d7d33ca5059f36" + integrity sha512-ghHup2voGfgFoHMGnaLHOjbYFACKrRh9KFttdCzMCbFoBMJXiNi2+XTrPP8+q6cDJM/RSqlCfVWrjp1H201rZg== + +hast-util-is-element@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz#3b3ed5159a2707c6137b48637fbfe068e175a425" + integrity sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ== + hast-util-parse-selector@^2.0.0: version "2.2.5" resolved "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz" @@ -4407,6 +4492,26 @@ hast-util-raw@6.0.1: xtend "^4.0.0" zwitch "^1.0.0" +hast-util-select@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/hast-util-select/-/hast-util-select-4.0.2.tgz#ae3ef2860e02cda2ad3a2e72b47c1f5e8f44e9e7" + integrity sha512-8EEG2//bN5rrzboPWD2HdS3ugLijNioS1pqOTIolXNf67xxShYw4SQEmVXd3imiBG+U2bC2nVTySr/iRAA7Cjg== + dependencies: + bcp-47-match "^1.0.0" + comma-separated-tokens "^1.0.0" + css-selector-parser "^1.0.0" + direction "^1.0.0" + hast-util-has-property "^1.0.0" + hast-util-is-element "^1.0.0" + hast-util-to-string "^1.0.0" + hast-util-whitespace "^1.0.0" + not "^0.1.0" + nth-check "^2.0.0" + property-information "^5.0.0" + space-separated-tokens "^1.0.0" + unist-util-visit "^2.0.0" + zwitch "^1.0.0" + hast-util-to-parse5@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz" @@ -4418,6 +4523,25 @@ hast-util-to-parse5@^6.0.0: xtend "^4.0.0" zwitch "^1.0.0" +hast-util-to-string@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/hast-util-to-string/-/hast-util-to-string-1.0.4.tgz#9b24c114866bdb9478927d7e9c36a485ac728378" + integrity sha512-eK0MxRX47AV2eZ+Lyr18DCpQgodvaS3fAQO2+b9Two9F5HEoRPhiUMNzoXArMJfZi2yieFzUBMRl3HNJ3Jus3w== + +hast-util-to-text@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/hast-util-to-text/-/hast-util-to-text-2.0.1.tgz#04f2e065642a0edb08341976084aa217624a0f8b" + integrity sha512-8nsgCARfs6VkwH2jJU9b8LNTuR4700na+0h3PqCaEk4MAnMDeu5P0tP8mjk9LLNGxIeQRLbiDbZVw6rku+pYsQ== + dependencies: + hast-util-is-element "^1.0.0" + repeat-string "^1.0.0" + unist-util-find-after "^3.0.0" + +hast-util-whitespace@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-1.0.4.tgz#e4fe77c4a9ae1cb2e6c25e02df0043d0164f6e41" + integrity sha512-I5GTdSfhYfAPNztx2xJRQpG8cuDSNt599/7YUn7Gx/WxNMsG+a835k97TDkFgk123cwjfwINaZknkKkphx/f2A== + hastscript@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz" @@ -4446,6 +4570,14 @@ history@^4.9.0: tiny-warning "^1.0.0" value-equal "^1.0.1" +hogan.js@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/hogan.js/-/hogan.js-3.0.2.tgz#4cd9e1abd4294146e7679e41d7898732b02c7bfd" + integrity sha512-RqGs4wavGYJWE07t35JQccByczmNUXQT0E12ZYV1VKYu5UiAU9lsos/yBAcf840+zrUQQxgVduCR5/B8nNtibg== + dependencies: + mkdirp "0.3.0" + nopt "1.0.10" + hoist-non-react-statics@^3.1.0: version "3.3.2" resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" @@ -4532,16 +4664,6 @@ http-deceiver@^1.2.7: resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" integrity sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw== -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" - integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - http-errors@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" @@ -4553,6 +4675,16 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" + integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + http-parser-js@>=0.5.1: version "0.5.8" resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz" @@ -4612,6 +4744,11 @@ image-size@^1.0.1: dependencies: queue "6.0.2" +immediate@^3.2.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" + integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== + immer@^9.0.7: version "9.0.21" resolved "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz" @@ -4653,7 +4790,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@2, inherits@2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -4663,16 +4800,16 @@ inherits@2.0.3: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== -ini@^1.3.5, ini@~1.3.0: - version "1.3.8" - resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - ini@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz" integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== +ini@^1.3.5, ini@~1.3.0: + version "1.3.8" + resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + inline-style-parser@0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz" @@ -4690,17 +4827,17 @@ invariant@^2.2.4: dependencies: loose-envify "^1.0.0" -ipaddr.js@^2.0.1: - version "2.1.0" - resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz" - integrity sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ== - ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-alphabetical@^1.0.0, is-alphabetical@1.0.4: +ipaddr.js@^2.0.1: + version "2.1.0" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz" + integrity sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ== + +is-alphabetical@1.0.4, is-alphabetical@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz" integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== @@ -4883,16 +5020,16 @@ is-yarn-global@^0.3.0: resolved "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz" integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - isarray@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" @@ -5122,7 +5259,7 @@ lodash.memoize@^4.1.2: resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== -lodash.uniq@^4.5.0, lodash.uniq@4.5.0: +lodash.uniq@4.5.0, lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== @@ -5170,6 +5307,16 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lunr-languages@^1.4.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/lunr-languages/-/lunr-languages-1.13.0.tgz#81840f0e2abe2e4cbc5aeb793477b7616dca2bdf" + integrity sha512-qgTOarcnAtVFKr0aJ2GuiqbBdhKF61jpF8OgFbnlSAb1t6kOiQW67q0hv0UQzzB+5+OwPpnZyFT/L0L9SQG1/A== + +lunr@^2.3.8: + version "2.3.9" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" @@ -5265,7 +5412,7 @@ micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.2" picomatch "^2.3.1" -"mime-db@>= 1.43.0 < 2": +mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": version "1.52.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== @@ -5275,40 +5422,14 @@ mime-db@~1.33.0: resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz" integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.27: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime-types@^2.1.31: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime-types@~2.1.17, mime-types@2.1.18: +mime-types@2.1.18, mime-types@~2.1.17: version "2.1.18" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz" integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== dependencies: mime-db "~1.33.0" -mime-types@~2.1.24: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime-types@~2.1.34: +mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -5347,7 +5468,7 @@ minimalistic-assert@^1.0.0: resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@3.1.2: +minimatch@3.1.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -5364,6 +5485,11 @@ mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: resolved "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== +mkdirp@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" + integrity sha512-OHsdUcVAQ6pOtg5JYWpCBo9W/GySVuwvP9hueRMW7UqshC0tbfzLv8wjySTPm3tfUZ/21CE9E1pJagOA91Pxew== + mrmime@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz" @@ -5432,6 +5558,11 @@ node-addon-api@^5.0.0: resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz" integrity sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA== +node-addon-api@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76" + integrity sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA== + node-emoji@^1.10.0: version "1.11.0" resolved "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz" @@ -5456,6 +5587,13 @@ node-releases@^2.0.13: resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz" integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== +nopt@1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" + integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== + dependencies: + abbrev "1" + normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" @@ -5476,6 +5614,11 @@ normalize-url@^6.0.1: resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== +not@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/not/-/not-0.1.0.tgz#c9691c1746c55dcfbe54cbd8bd4ff041bc2b519d" + integrity sha512-5PDmaAsVfnWUgTUbJ3ERwn7u79Z0dYxN9ErxCpVJJqe2RK0PJ3z+iFUxuqjwtlDDegXvtWoxD/3Fzxox7tFGWA== + npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" @@ -5488,7 +5631,7 @@ nprogress@^0.2.0: resolved "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz" integrity sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA== -nth-check@^2.0.1: +nth-check@^2.0.0, nth-check@^2.0.1: version "2.1.1" resolved "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz" integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== @@ -5740,13 +5883,6 @@ path-parse@^1.0.7: resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-to-regexp@^1.7.0: - version "1.8.0" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz" - integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== - dependencies: - isarray "0.0.1" - path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" @@ -5757,6 +5893,13 @@ path-to-regexp@2.2.1: resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz" integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== +path-to-regexp@^1.7.0: + version "1.8.0" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz" + integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== + dependencies: + isarray "0.0.1" + path-type@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" @@ -6067,7 +6210,7 @@ postcss-zindex@^5.1.0: resolved "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-5.1.0.tgz" integrity sha512-fgFMf0OtVSBR1va1JNHYgMxYk73yhn/qb4uQDq1DLGYolz8gHCyr/sesEuGUaYs58E3ZJRcpoGuPVoB7Meiq9A== -"postcss@^7.0.0 || ^8.0.1", postcss@^8.0.9, postcss@^8.1.0, postcss@^8.2.15, postcss@^8.2.2, postcss@^8.3.11, postcss@^8.4.14, postcss@^8.4.16, postcss@^8.4.17, postcss@^8.4.21: +postcss@^8.3.11, postcss@^8.4.14, postcss@^8.4.17, postcss@^8.4.21: version "8.4.27" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz" integrity sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ== @@ -6142,7 +6285,7 @@ prompts@^2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.0.0, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@>=15: +prop-types@^15.0.0, prop-types@^15.6.2, prop-types@^15.7.2: version "15.8.1" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -6208,6 +6351,11 @@ queue-microtask@^1.2.2: resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +queue-tick@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" + integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== + queue@6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz" @@ -6222,21 +6370,16 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -range-parser@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - range-parser@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz" integrity sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A== +range-parser@^1.2.1, range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + raw-body@2.5.1: version "2.5.1" resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz" @@ -6247,7 +6390,7 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" -rc@^1.2.7, rc@^1.2.8, rc@1.2.8: +rc@1.2.8, rc@^1.2.7, rc@^1.2.8: version "1.2.8" resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -6297,7 +6440,7 @@ react-dev-utils@^12.0.1: strip-ansi "^6.0.1" text-table "^0.2.0" -react-dom@*, "react-dom@^16.6.0 || ^17.0.0 || ^18.0.0", "react-dom@^16.8.4 || ^17.0.0", "react-dom@^17.0.0 || ^16.3.0 || ^15.5.4", react-dom@^17.0.2, "react-dom@>= 16.8.0 < 19.0.0": +react-dom@^17.0.2: version "17.0.2" resolved "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz" integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== @@ -6359,14 +6502,6 @@ react-loadable-ssr-addon-v5-slorber@^1.0.1: dependencies: "@babel/runtime" "^7.10.3" -react-loadable@*, "react-loadable@npm:@docusaurus/react-loadable@5.5.2": - version "5.5.2" - resolved "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz" - integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ== - dependencies: - "@types/react" "*" - prop-types "^15.6.2" - react-router-config@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/react-router-config/-/react-router-config-5.1.1.tgz" @@ -6387,7 +6522,7 @@ react-router-dom@^5.3.3: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-router@^5.3.3, react-router@>=5, react-router@5.3.4: +react-router@5.3.4, react-router@^5.3.3: version "5.3.4" resolved "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz" integrity sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA== @@ -6411,7 +6546,7 @@ react-textarea-autosize@^8.3.2: use-composed-ref "^1.3.0" use-latest "^1.2.1" -react-waypoint@^10.3.0, react-waypoint@>=9.0.2: +react-waypoint@^10.3.0: version "10.3.0" resolved "https://registry.npmjs.org/react-waypoint/-/react-waypoint-10.3.0.tgz" integrity sha512-iF1y2c1BsoXuEGz08NoahaLFIGI9gTUAAOKip96HUmylRT6DUtpgoBPjk/Y8dfcFVmfVDvUzWjNXpZyKTOV0SQ== @@ -6421,7 +6556,7 @@ react-waypoint@^10.3.0, react-waypoint@>=9.0.2: prop-types "^15.0.0" react-is "^17.0.1 || ^18.0.0" -react@*, "react@^15.0.2 || ^16.0.0 || ^17.0.0", "react@^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.13.1 || ^17.0.0", "react@^16.6.0 || ^17.0.0 || ^18.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^16.8.4 || ^17.0.0", "react@^17.0.0 || ^16.3.0 || ^15.5.4", react@^17.0.2, "react@>= 16.8.0 < 19.0.0", react@>=0.14.9, react@>=0.14.x, react@>=15, react@17.0.2: +react@^17.0.2: version "17.0.2" resolved "https://registry.npmjs.org/react/-/react-17.0.2.tgz" integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== @@ -6534,6 +6669,14 @@ regjsparser@^0.9.1: dependencies: jsesc "~0.5.0" +rehype-parse@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-7.0.1.tgz#58900f6702b56767814afc2a9efa2d42b1c90c57" + integrity sha512-fOiR9a9xH+Le19i4fGzIEowAbwG7idy2Jzs4mOrFWBSJ0sNUgy0ev871dwWnbOo371SjgjG4pwzrbgSVrKxecw== + dependencies: + hast-util-from-parse5 "^6.0.0" + parse5 "^6.0.0" + relateurl@^0.2.7: version "0.2.7" resolved "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz" @@ -6607,7 +6750,7 @@ renderkid@^3.0.0: lodash "^4.17.21" strip-ansi "^6.0.1" -repeat-string@^1.5.4: +repeat-string@^1.0.0, repeat-string@^1.5.4: version "1.6.1" resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== @@ -6699,21 +6842,16 @@ rxjs@^7.5.4: dependencies: tslib "^2.1.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@>=5.1.0, safe-buffer@~5.2.0, safe-buffer@5.2.1: +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" @@ -6732,6 +6870,15 @@ scheduler@^0.20.2: loose-envify "^1.1.0" object-assign "^4.1.1" +schema-utils@2.7.0: + version "2.7.0" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz" + integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== + dependencies: + "@types/json-schema" "^7.0.4" + ajv "^6.12.2" + ajv-keywords "^3.4.1" + schema-utils@^2.6.5: version "2.7.1" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz" @@ -6741,25 +6888,7 @@ schema-utils@^2.6.5: ajv "^6.12.4" ajv-keywords "^3.5.2" -schema-utils@^3.0.0: - version "3.3.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" - integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -schema-utils@^3.1.1: - version "3.3.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" - integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -schema-utils@^3.2.0: +schema-utils@^3.0.0, schema-utils@^3.1.1, schema-utils@^3.2.0: version "3.3.0" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== @@ -6778,20 +6907,6 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.1.0" -schema-utils@2.7.0: - version "2.7.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz" - integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== - dependencies: - "@types/json-schema" "^7.0.4" - ajv "^6.12.2" - ajv-keywords "^3.4.1" - -"search-insights@>= 1 < 3": - version "2.7.0" - resolved "https://registry.npmjs.org/search-insights/-/search-insights-2.7.0.tgz" - integrity sha512-GLbVaGgzYEKMvuJbHRhLi1qoBFnjXZGZ6l4LxOYPCp4lI2jDRB3jPU9/XNhMwv6kvnA9slTreq6pvK+b3o3aqg== - section-matter@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz" @@ -6824,27 +6939,12 @@ semver@^5.4.1: resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^6.2.0: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^6.3.0: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^6.3.1: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: +semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.4: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -6941,7 +7041,7 @@ shallowequal@^1.1.0: resolved "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz" integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== -sharp@*, sharp@^0.30.7: +sharp@^0.30.7: version "0.30.7" resolved "https://registry.npmjs.org/sharp/-/sharp-0.30.7.tgz" integrity sha512-G+MY2YW33jgflKPTXXptVO28HvNOo9G3j0MybYAHeEmby+QuD2U98dT6ueht9cv/XDqZspSpIhoSW+BAKJ7Hig== @@ -6955,6 +7055,20 @@ sharp@*, sharp@^0.30.7: tar-fs "^2.1.1" tunnel-agent "^0.6.0" +sharp@^0.32.5: + version "0.32.5" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.32.5.tgz#9ddc78ead6446094f51e50355a2d4ec6e7220cd4" + integrity sha512-0dap3iysgDkNaPOaOL4X/0akdu0ma62GcdC2NBQ+93eqpePdDdr2/LM0sFdDSMmN7yS+odyZtPsb7tx/cYBKnQ== + dependencies: + color "^4.2.3" + detect-libc "^2.0.2" + node-addon-api "^6.1.0" + prebuild-install "^7.1.1" + semver "^7.5.4" + simple-get "^4.0.1" + tar-fs "^3.0.4" + tunnel-agent "^0.6.0" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" @@ -6990,7 +7104,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.2, signal-exit@^3.0.3: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -7130,45 +7244,30 @@ state-toggle@^1.0.0: resolved "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz" integrity sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ== -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" - integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== - statuses@2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +"statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== + std-env@^3.0.1: version "3.3.3" resolved "https://registry.npmjs.org/std-env/-/std-env-3.3.3.tgz" integrity sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg== -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== +streamx@^2.15.0: + version "2.15.1" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.15.1.tgz#396ad286d8bc3eeef8f5cea3f029e81237c024c6" + integrity sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA== dependencies: - safe-buffer "~5.2.0" + fast-fifo "^1.1.0" + queue-tick "^1.0.1" -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.2: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.2.0: +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -7186,6 +7285,20 @@ string-width@^5.0.1: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + stringify-object@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz" @@ -7229,7 +7342,7 @@ strip-json-comments@~2.0.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -style-to-object@^0.3.0, style-to-object@0.3.0: +style-to-object@0.3.0, style-to-object@^0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz" integrity sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA== @@ -7308,6 +7421,15 @@ tar-fs@^2.0.0, tar-fs@^2.1.1: pump "^3.0.0" tar-stream "^2.1.4" +tar-fs@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.4.tgz#a21dc60a2d5d9f55e0089ccd78124f1d3771dbbf" + integrity sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w== + dependencies: + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^3.1.5" + tar-stream@^2.1.4: version "2.2.0" resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz" @@ -7319,6 +7441,15 @@ tar-stream@^2.1.4: inherits "^2.0.3" readable-stream "^3.1.1" +tar-stream@^3.1.5: + version "3.1.6" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.6.tgz#6520607b55a06f4a2e2e04db360ba7d338cc5bab" + integrity sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg== + dependencies: + b4a "^1.6.4" + fast-fifo "^1.2.0" + streamx "^2.15.0" + terser-webpack-plugin@^5.3.3, terser-webpack-plugin@^5.3.7: version "5.3.9" resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz" @@ -7377,6 +7508,14 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +to-vfile@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/to-vfile/-/to-vfile-6.1.0.tgz#5f7a3f65813c2c4e34ee1f7643a5646344627699" + integrity sha512-BxX8EkCxOAZe+D/ToHdDsJcVI4HqQfmw0tCkp31zf3dNP/XWIAjU4CmeuSwsSoOzOTqHPOL0KUzyZqJplkD0Qw== + dependencies: + is-buffer "^2.0.0" + vfile "^4.0.0" + toidentifier@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" @@ -7444,11 +7583,6 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -"typescript@>= 2.7": - version "5.1.6" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz" - integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== - ua-parser-js@^1.0.35: version "1.0.35" resolved "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.35.tgz" @@ -7485,10 +7619,10 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz" integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== -unified@^9.2.2: - version "9.2.2" - resolved "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz" - integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ== +unified@9.2.0: + version "9.2.0" + resolved "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz" + integrity sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg== dependencies: bail "^1.0.0" extend "^3.0.0" @@ -7497,10 +7631,10 @@ unified@^9.2.2: trough "^1.0.0" vfile "^4.0.0" -unified@9.2.0: - version "9.2.0" - resolved "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz" - integrity sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg== +unified@^9.0.0, unified@^9.2.2: + version "9.2.2" + resolved "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz" + integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ== dependencies: bail "^1.0.0" extend "^3.0.0" @@ -7516,17 +7650,24 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" -unist-builder@^2.0.0, unist-builder@2.0.3: +unist-builder@2.0.3, unist-builder@^2.0.0: version "2.0.3" resolved "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz" integrity sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw== +unist-util-find-after@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unist-util-find-after/-/unist-util-find-after-3.0.0.tgz#5c65fcebf64d4f8f496db46fa8fd0fbf354b43e6" + integrity sha512-ojlBqfsBftYXExNu3+hHLfJQ/X1jYY/9vdm4yZWjIbf0VuWF6CRufci1ZyoD/wV2TYMKxXUoNuoqwy+CkgzAiQ== + dependencies: + unist-util-is "^4.0.0" + unist-util-generated@^1.0.0: version "1.1.6" resolved "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz" integrity sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg== -unist-util-is@^4.0.0: +unist-util-is@^4.0.0, unist-util-is@^4.0.2: version "4.1.0" resolved "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz" integrity sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg== @@ -7565,7 +7706,7 @@ unist-util-visit-parents@^3.0.0: "@types/unist" "^2.0.0" unist-util-is "^4.0.0" -unist-util-visit@^2.0.0, unist-util-visit@^2.0.3, unist-util-visit@2.0.3: +unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz" integrity sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q== @@ -7579,7 +7720,7 @@ universalify@^2.0.0: resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unpipe@~1.0.0, unpipe@1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -7832,7 +7973,7 @@ webpack-sources@^3.2.2, webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -"webpack@^4.0.0 || ^5.0.0", "webpack@^4.37.0 || ^5.0.0", webpack@^5.0.0, webpack@^5.1.0, webpack@^5.20.0, webpack@^5.73.0, "webpack@>= 4", webpack@>=2, "webpack@>=4.41.1 || 5.x", "webpack@3 || 4 || 5": +webpack@^5.73.0: version "5.88.2" resolved "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz" integrity sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ== @@ -7872,7 +8013,7 @@ webpackbar@^5.0.2: pretty-time "^1.1.0" std-env "^3.0.1" -websocket-driver@^0.7.4, websocket-driver@>=0.5.1: +websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== @@ -7908,6 +8049,13 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +wide-align@^1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + widest-line@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz" From 40439594853bc11e63a96d78c40b197428c72747 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Wed, 23 Aug 2023 08:12:52 -0700 Subject: [PATCH 010/174] add replicate to docs --- docs/my-website/docs/completion/supported.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/my-website/docs/completion/supported.md b/docs/my-website/docs/completion/supported.md index c26e89ff8ba..c8fc6a0f64f 100644 --- a/docs/my-website/docs/completion/supported.md +++ b/docs/my-website/docs/completion/supported.md @@ -77,6 +77,21 @@ Here are some examples of supported models: | [bigcode/starcoder](https://huggingface.co/bigcode/starcoder) | `completion(model="bigcode/starcoder", messages=messages, custom_llm_provider="huggingface")` | `os.environ['HUGGINGFACE_API_KEY']` | | [google/flan-t5-xxl](https://huggingface.co/google/flan-t5-xxl) | `completion(model="google/flan-t5-xxl", messages=messages, custom_llm_provider="huggingface")` | `os.environ['HUGGINGFACE_API_KEY']` | | [google/flan-t5-large](https://huggingface.co/google/flan-t5-large) | `completion(model="google/flan-t5-large", messages=messages, custom_llm_provider="huggingface")` | `os.environ['HUGGINGFACE_API_KEY']` | + +### Replicate Models +liteLLM supports all replicate LLMs. For replicate models ensure to add a `replicate` prefix to the `model` arg. liteLLM detects it using this arg. +Below are examples on how to call replicate LLMs using liteLLM + + replicate/llama-2-70b-chat | `completion('replicate/replicate/llama-2-70b-chat', messages)` | `os.environ['REPLICATE_API_KEY']` | + a16z-infra/llama-2-13b-chat | `completion('replicate/a16z-infra/llama-2-13b-chat', messages)` | `os.environ['REPLICATE_API_KEY']` | + joehoover/instructblip-vicuna13b | `completion('replicate/joehoover/instructblip-vicuna13b', messages)` | `os.environ['REPLICATE_API_KEY']` | + replicate/dolly-v2-12b | `completion('replicate/replicate/dolly-v2-12b', messages)` | `os.environ['REPLICATE_API_KEY']` | + a16z-infra/llama-2-7b-chat | `completion('replicate/a16z-infra/llama-2-7b-chat', messages)` | `os.environ['REPLICATE_API_KEY']` | + replicate/vicuna-13b | `completion('replicate/replicate/vicuna-13b', messages)` | `os.environ['REPLICATE_API_KEY']` | + daanelson/flan-t5-large | `completion('replicate/daanelson/flan-t5-large', messages)` | `os.environ['REPLICATE_API_KEY']` | + replit/replit-code-v1-3b | `completion('replicate/replit/replit-code-v1-3b', messages)` | `os.environ['REPLICATE_API_KEY']` | + + ### AI21 Models | Model Name | Function Call | Required OS Variables | From 0eaf5c4a22ae2c164d3155a32ed834da8baa69fb Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Wed, 23 Aug 2023 08:16:16 -0700 Subject: [PATCH 011/174] fix replicate docs --- docs/my-website/docs/completion/supported.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/my-website/docs/completion/supported.md b/docs/my-website/docs/completion/supported.md index c8fc6a0f64f..525bbf407eb 100644 --- a/docs/my-website/docs/completion/supported.md +++ b/docs/my-website/docs/completion/supported.md @@ -82,15 +82,16 @@ Here are some examples of supported models: liteLLM supports all replicate LLMs. For replicate models ensure to add a `replicate` prefix to the `model` arg. liteLLM detects it using this arg. Below are examples on how to call replicate LLMs using liteLLM - replicate/llama-2-70b-chat | `completion('replicate/replicate/llama-2-70b-chat', messages)` | `os.environ['REPLICATE_API_KEY']` | - a16z-infra/llama-2-13b-chat | `completion('replicate/a16z-infra/llama-2-13b-chat', messages)` | `os.environ['REPLICATE_API_KEY']` | +Model Name | Function Call | Required OS Variables | +-----------------------------|----------------------------------------------------------------|--------------------------------------| + replicate/llama-2-70b-chat | `completion('replicate/replicate/llama-2-70b-chat', messages)` | `os.environ['REPLICATE_API_KEY']` | + a16z-infra/llama-2-13b-chat| `completion('replicate/a16z-infra/llama-2-13b-chat', messages)`| `os.environ['REPLICATE_API_KEY']` | joehoover/instructblip-vicuna13b | `completion('replicate/joehoover/instructblip-vicuna13b', messages)` | `os.environ['REPLICATE_API_KEY']` | - replicate/dolly-v2-12b | `completion('replicate/replicate/dolly-v2-12b', messages)` | `os.environ['REPLICATE_API_KEY']` | - a16z-infra/llama-2-7b-chat | `completion('replicate/a16z-infra/llama-2-7b-chat', messages)` | `os.environ['REPLICATE_API_KEY']` | - replicate/vicuna-13b | `completion('replicate/replicate/vicuna-13b', messages)` | `os.environ['REPLICATE_API_KEY']` | - daanelson/flan-t5-large | `completion('replicate/daanelson/flan-t5-large', messages)` | `os.environ['REPLICATE_API_KEY']` | - replit/replit-code-v1-3b | `completion('replicate/replit/replit-code-v1-3b', messages)` | `os.environ['REPLICATE_API_KEY']` | - + replicate/dolly-v2-12b | `completion('replicate/replicate/dolly-v2-12b', messages)` | `os.environ['REPLICATE_API_KEY']` | + a16z-infra/llama-2-7b-chat | `completion('replicate/a16z-infra/llama-2-7b-chat', messages)` | `os.environ['REPLICATE_API_KEY']` | + replicate/vicuna-13b | `completion('replicate/replicate/vicuna-13b', messages)` | `os.environ['REPLICATE_API_KEY']` | + daanelson/flan-t5-large | `completion('replicate/daanelson/flan-t5-large', messages)` | `os.environ['REPLICATE_API_KEY']` | + replit/replit-code-v1-3b | `completion('replicate/replit/replit-code-v1-3b', messages)` | `os.environ['REPLICATE_API_KEY']` | ### AI21 Models From e5e060e84619b8c3d6220f027ddf0420acec95c5 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 23 Aug 2023 08:37:38 -0700 Subject: [PATCH 012/174] updated docs for baseten calling --- docs/my-website/docs/completion/supported.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/my-website/docs/completion/supported.md b/docs/my-website/docs/completion/supported.md index 525bbf407eb..e3719938c29 100644 --- a/docs/my-website/docs/completion/supported.md +++ b/docs/my-website/docs/completion/supported.md @@ -128,9 +128,9 @@ Example Baseten Usage - Note: liteLLM supports all models deployed on Basten | Model Name | Function Call | Required OS Variables | |------------------|--------------------------------------------|------------------------------------| -| Falcon 7B | `completion(model='', messages=messages, custom_llm_provider="baseten")` | `os.environ['BASETEN_API_KEY']` | -| Wizard LM | `completion(model='', messages=messages, custom_llm_provider="baseten")` | `os.environ['BASETEN_API_KEY']` | -| MPT 7B Base | `completion(model='', messages=messages, custom_llm_provider="baseten")` | `os.environ['BASETEN_API_KEY']` | +| Falcon 7B | `completion(model='baseten/qvv0xeq', messages=messages)` | `os.environ['BASETEN_API_KEY']` | +| Wizard LM | `completion(model='baseten/q841o8w', messages=messages)` | `os.environ['BASETEN_API_KEY']` | +| MPT 7B Base | `completion(model='baseten/31dxrj3', messages=messages)` | `os.environ['BASETEN_API_KEY']` | ### OpenRouter Completion Models From 5ea256baae214c41b0ea4747363b43b1a0563d1f Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Wed, 23 Aug 2023 08:40:37 -0700 Subject: [PATCH 013/174] add krrish changes --- litellm/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index e5fc4ea9d94..6e74135e54d 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -24,7 +24,7 @@ from .exceptions import ( ) from typing import List, Dict, Union, Optional -####### ENVIRONMENT VARIABLES ################### +####### ENVIRONMENT VARIABLES #################### dotenv.load_dotenv() # Loading env variables using dotenv sentry_sdk_instance = None capture_exception = None From 185830dc7d9a9b7c625d8ec619f3f370e4ed6aa9 Mon Sep 17 00:00:00 2001 From: Vince Lwt Date: Wed, 23 Aug 2023 18:45:34 +0200 Subject: [PATCH 014/174] Add demo video to docs --- docs/my-website/docs/observability/llmonitor_integration.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/my-website/docs/observability/llmonitor_integration.md b/docs/my-website/docs/observability/llmonitor_integration.md index 2d018c2667c..680c6b6e7d0 100644 --- a/docs/my-website/docs/observability/llmonitor_integration.md +++ b/docs/my-website/docs/observability/llmonitor_integration.md @@ -2,6 +2,10 @@ [LLMonitor](https://llmonitor.com/) is an open source observability platform that provides cost tracking, user tracking and powerful agent tracing. + + ## Use LLMonitor to log requests across all LLM Providers (OpenAI, Azure, Anthropic, Cohere, Replicate, PaLM) liteLLM provides `callbacks`, making it easy for you to log data depending on the status of your responses. From 1c5020da114ba89b66474a1c77f0a97b4e16948d Mon Sep 17 00:00:00 2001 From: Vince Lwt Date: Wed, 23 Aug 2023 18:50:12 +0200 Subject: [PATCH 015/174] Add support infos --- .../docs/observability/llmonitor_integration.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/observability/llmonitor_integration.md b/docs/my-website/docs/observability/llmonitor_integration.md index 680c6b6e7d0..f267dfefc4c 100644 --- a/docs/my-website/docs/observability/llmonitor_integration.md +++ b/docs/my-website/docs/observability/llmonitor_integration.md @@ -1,6 +1,6 @@ # LLMonitor Tutorial -[LLMonitor](https://llmonitor.com/) is an open source observability platform that provides cost tracking, user tracking and powerful agent tracing. +[LLMonitor](https://llmonitor.com/) is an open-source observability platform that provides cost tracking, user tracking and powerful agent tracing.