From c1b89f6d6cd77e654409fb9c3cb07984a678401f Mon Sep 17 00:00:00 2001 From: James Sumners Date: Wed, 5 Jun 2024 10:44:58 -0400 Subject: [PATCH] chore: Added AI support docs for automation --- .github/workflows/compatibility-report.yml | 1 + ai-support.json | 148 +++++++++++++++++++++ ai-support.spec.md | 66 +++++++++ 3 files changed, 215 insertions(+) create mode 100644 ai-support.json create mode 100644 ai-support.spec.md diff --git a/.github/workflows/compatibility-report.yml b/.github/workflows/compatibility-report.yml index 162154764d..5716dd9359 100644 --- a/.github/workflows/compatibility-report.yml +++ b/.github/workflows/compatibility-report.yml @@ -23,6 +23,7 @@ on: - main paths: - 'test/versioned/**/package.json' + - 'ai-support.json' jobs: local: diff --git a/ai-support.json b/ai-support.json new file mode 100644 index 0000000000..c77a1e6e23 --- /dev/null +++ b/ai-support.json @@ -0,0 +1,148 @@ +{ + "bedrock": { + "kind": "gateway", + "title": "Amazon Bedrock", + "models": [ + { + "name": "Claude", + "features": [ + { + "title": "Text", + "supported": true + }, + { + "title": "Image", + "supported": false + } + ] + }, + + { + "name": "Cohere", + "features": [ + { + "title": "Text", + "supported": true + }, + { + "title": "Image", + "supported": false + } + ] + }, + + { + "name": "Jurassic-2", + "features": [ + { + "title": "Text", + "supported": true + }, + { + "title": "Image", + "supported": false + } + ] + }, + + { + "name": "Llama2", + "features": [ + { + "title": "Text", + "supported": true + }, + { + "title": "Image", + "supported": false + } + ] + }, + + { + "name": "Titan", + "features": [ + { + "title": "Text", + "supported": true + }, + { + "title": "Image", + "supported": false + } + ] + } + ] + }, + + "langchain": { + "kind": "abstraction", + "title": "Langchain", + "features": [ + { + "title": "Agents", + "supported": true + }, + { + "title": "Agents", + "supported": true + }, + { + "title": "Vectorstores", + "supported": true + }, + { + "title": "Tools", + "supported": true + } + ], + "providers": [ + { + "name": "Azure OpenAI", + "supported": false, + "transitively": false + }, + { + "name": "Amazon Bedrock", + "supported": false, + "transitively": false + }, + { + "name": "OpenAI", + "supported": true, + "transitively": true + } + ] + }, + + "openai": { + "kind": "sdk", + "title": "OpenAI", + "features": [ + { + "title": "Completions", + "supported": true + }, + { + "title": "Chat", + "supported": true + }, + { + "title": "Embeddings", + "supported": true + }, + { + "title": "Files", + "supported": false + }, + { + "title": "Images", + "supported": false + }, + { + "title": "Audio", + "supported": false + } + ] + } +} diff --git a/ai-support.spec.md b/ai-support.spec.md new file mode 100644 index 0000000000..c54b15a84b --- /dev/null +++ b/ai-support.spec.md @@ -0,0 +1,66 @@ +# AI Support Spec + +This document describes the structure of the [ai-support.json](./ai-support.json) +file. The JSON file is utilized by an automation to update our documentation +with the AI libraries/abstractions/gateways that we support. + +## Structure + +The general structure of the JSON file is that of an object who's keys +map to a descriptor for a supported AI thing. Each descriptor has a `kind` +property that indicates what sort of AI thing is being described. + +### kind = "abstraction" + +An abstraction is a module that provides a single common interface to many +LLMs or gateways. An abstraction descriptor has the following fields: + ++ `title` (string): A human readable name for the abstraction. ++ `features` (object[]): An array of feature entities. ++ `providers` (object[]): An array of provider entities. + +### kind = "gateway" + +A gateway is a service that provides access to multiple large language models +(LLMs) through a single API. A gateway descriptor has the following fields: + ++ `title` (string): A human readable name for the gateway. ++ `models` (object[]): An array of model entities. + +### kind = "sdk" + +A SDK is a module that provides an API that is specific to a single LLM. An SDK +descriptor has the following fields: + ++ `title` (string): A human readable name for the SDK. ++ `features` (object[]): An array of feature entities. + +## Entities + +### Feature + +Describes an LLM feature. It is an object with the following fields: + ++ `title` (string): A human readable name for the feature. ++ `supported` (boolean): Indicates if our instrumentation supports the feature +or not. + +### Model + +Describes an LLM, the features it supports, and the features we instrument. It +is an object with the following fields: + ++ `name` (string): A human readable name for the LLM. ++ `features` (object[]): An array of feature entities. + +### Provider + +Describes an LLM or gateway that is supported by an abstraction. It is an object +with the following fields: + ++ `name` (string): A human readable name for the LLM or gateway. ++ `supported` (boolean): Indicates if we instrument this provider within the +context of the abstraction. ++ `transitively` (boolean): Indicates if we instrument this provider directly +in the instrumentation for the abstraction (`false`), or if we rely on a +transitive instrumentation (`true`).