From 85359168877f64848555099865f9662024c84a9b Mon Sep 17 00:00:00 2001 From: jmansdorfer Date: Wed, 16 Oct 2024 18:22:58 -0400 Subject: [PATCH 1/4] updating docs to remove sqlcoder and add new embeddings features --- fern/docs/pages/options/enumerations.mdx | 2 +- fern/docs/pages/options/models.mdx | 95 ++++++++------- fern/docs/pages/options/prompts.mdx | 17 --- fern/docs/pages/usingllms/embeddings.mdx | 32 +++++ ...ard-Prediction-Guard-API-1.0-resolved.yaml | 110 ++++++++++-------- 5 files changed, 149 insertions(+), 107 deletions(-) diff --git a/fern/docs/pages/options/enumerations.mdx b/fern/docs/pages/options/enumerations.mdx index 5591b22..2a05203 100644 --- a/fern/docs/pages/options/enumerations.mdx +++ b/fern/docs/pages/options/enumerations.mdx @@ -25,13 +25,13 @@ This page provides the list of enumerations used by the Prediction Guard API. | Nous-Hermes-Llama2-13b | Text Generation | Generating output in response to arbitrary instructions | [Alpaca](/options/prompts#alpaca) | 4096 | [link](/options/models#nous-hermes-llama2-13b) | | Hermes-2-Pro-Mistral-7B | Chat | Instruction following or chat-like applications | [ChatML](/options/prompts#chatml) | 4096 | [link](/options/models#hermes-2-pro-mistral-7b) | | neural-chat-7b-v3-3 | Chat | Instruction following or chat-like applications | [Neural Chat](/options/prompts#neural-chat) | 4096 | [link](/options/models#neural-chat-7b) | -| llama-3-sqlcoder-8b | SQL Query Generation | Generating SQL queries | [Llama-3-SQLCoder](/options/prompts#llama-3-sqlcoder) | 4096 | [link](/options/models#llama-3-sqlcoder-8b) | | deepseek-coder-6.7b-instruct | Code Generation | Generating computer code or answering tech questions | [Deepseek](/options/prompts#deepseek) | 4096 | [link](/options/models#deepseek-coder-67b-instruct) | ### This Model is required in the `/embeddings` endpoint: | Model Name | Type | Use Case | Context Length | More Info | | --------------------------------- | --------------------- | ----------------------------------------------- | -------------- | ------------------------------------------------------| +| multilingual-e5-large-instruct | Embedding Generation | Used for generating text embeddings | 512 | [link](/options/models#multilingual-e5-large-instruct) | | bridgetower-large-itm-mlm-itc | Embedding Generation | Used for generating text and image embedding | 100 | [link](/options/models#bridgetower-large-itm-mlm-itc) | ### This Model is required in the `/chat/completions` vision endpoint: diff --git a/fern/docs/pages/options/models.mdx b/fern/docs/pages/options/models.mdx index 05c134f..45a99b1 100644 --- a/fern/docs/pages/options/models.mdx +++ b/fern/docs/pages/options/models.mdx @@ -14,9 +14,9 @@ with an improved focus on longer context lengths. This allows for more accuracy in areas that require a longer context window, along with being an improved version of the previous Hermes and Llama line of models. -**Type**: Chat -**Use Case**: Instruction Following or Chat-Like Applications -**Prompt Format**: [ChatML](/options/prompts#chatml) +**Type:** Chat +**Use Case:** Instruction Following or Chat-Like Applications +**Prompt Format:** [ChatML](/options/prompts#chatml) https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B @@ -37,9 +37,9 @@ A general use model that maintains excellent general task and conversation capabilities while excelling at JSON Structured Outputs and improving on several other metrics. -**Type**: Chat -**Use Case**: Instruction Following or Chat-Like Applications -**Prompt Format**: [ChatML](/options/prompts#chatml) +**Type:** Chat +**Use Case:** Instruction Following or Chat-Like Applications +**Prompt Format:** [ChatML](/options/prompts#chatml) https://huggingface.co/NousResearch/Hermes-2-Pro-Llama-3-8B @@ -64,9 +64,9 @@ billion parameter count, enabling it to perform in-depth data analysis and support complex decision-making processes. This model is designed to process large volumes of data, uncover hidden patterns, and provide actionable insights. -**Type**: Text Generation -**Use Case**: Generating Output in Response to Arbitrary Instructions -**Prompt Format**: [Alpaca](/options/prompts#alpaca) +**Type:** Text Generation +**Use Case:** Generating Output in Response to Arbitrary Instructions +**Prompt Format:** [Alpaca](/options/prompts#alpaca) https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b @@ -92,9 +92,9 @@ excels in delivering accurate and contextually relevant responses, making it ide for a wide range of applications, including chatbots, language translation, content creation, and more. -**Type**: Chat -**Use Case**: Instruction Following or Chat-Like Applications -**Prompt Format**: [ChatML](/options/prompts#chatml) +**Type:** Chat +**Use Case:** Instruction Following or Chat-Like Applications +**Prompt Format:** [ChatML](/options/prompts#chatml) https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B @@ -114,11 +114,11 @@ reliable and easy to parse. Learn more about prompting below. ## neural-chat-7b-v3-3 -A revolutionary AI model for perfoming digital conversations. +A revolutionary AI model for performing digital conversations. -**Type**: Chat -**Use Case**: Instruction Following or Chat-Like Applications -**Prompt Format**: [Neural Chat](/options/prompts#neural-chat) +**Type:** Chat +**Use Case:** Instruction Following or Chat-Like Applications +**Prompt Format:** [Neural Chat](/options/prompts#neural-chat) https://huggingface.co/Intel/neural-chat-7b-v3-3 @@ -130,27 +130,14 @@ from mistralai/Mistral-7B-v-0.1. For more information, refer to the blog [The Practice of Supervised Fine-tuning and Direct Preference Optimization on Intel Gaudi2](https://medium.com/@NeuralCompressor/the-practice-of-supervised-finetuning-and-direct-preference-optimization-on-habana-gaudi2-a1197d8a3cd3) -## llama-3-sqlcoder-8b - -A state of the art AI model for generating SQL queries from natural language. - -**Type**: SQL Query Generation -**Use Case**: Generating SQL Queries -**Prompt Format**: [Llama-3-SQLCoder](/options/prompts#llama-3-sqlcoder) - -https://huggingface.co/defog/llama-3-sqlcoder-8b - -A capable language model for text to SQL generation for Postgres, Redshift and -Snowflake that is on-par with the most capable generalist frontier models. - ## deepseek-coder-6.7b-instruct DeepSeek Coder is a capable coding model trained on two trillion code and natural language tokens. -**Type**: Code Generation -**Use Case**: Generating Computer Code or Answering Tech Questions -**Prompt Format**: [Deepseek](/options/prompts#deepseek) +**Type:** Code Generation +**Use Case:** Generating Computer Code or Answering Tech Questions +**Prompt Format:** [Deepseek](/options/prompts#deepseek) https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-instruct @@ -163,16 +150,40 @@ support project-level code completion and infilling. For coding capabilities, Deepseek Coder achieves state-of-the-art performance among open-source code models on multiple programming languages and various benchmarks. +## multilingual-e5-large-instruct + +Multilingual-e5 is a multilingual model for creating text embeddings in multiple languages. + +**Type:** Embedding Generation +**Use Case:** Used for Generating Text Embeddings + +https://huggingface.co/intfloat/multilingual-e5-large-instruct + +multilingual-e5-large-instruct is a robust, multilingual embedding model with +560 million parameters and a dimensionality of 1024, capable of processing +inputs with up to 512 tokens. This model builds on the xlm-roberta-large +architecture and is designed to excel in multilingual text embedding tasks +across 100 languages. Trained through a two-stage process, it first undergoes +contrastive pre-training on one billion weakly supervised text pairs, followed +by fine-tuning on diverse multilingual datasets from the E5-mistral paper. + +With state-of-the-art performance in text retrieval and semantic similarity, +this model demonstrates impressive results on the BEIR and MTEB benchmarks. +Users should note that task instructions are crucial for optimal performance, +as the model leverages these to customize embeddings for various scenarios. +Although the model generally supports 100 languages, performance may vary +for low-resource languages. + +With a training approach that mirrors the English E5 model recipe, it achieves +comparable quality to leading English-only models while offering a multilingual edge. + ## bridgetower-large-itm-mlm-itc BridgeTower is a multimodal model for creating joint embeddings between images and text. -_**Note: This Model is required to be used with the `/embeddings` endpoint. Most of the -SDKs will not ask you to provide model because it's using this one.**_ - -**Type**: Embedding Generation -**Use Case**: Used for Generating Text and Image Embedding +**Type:** Embedding Generation +**Use Case:** Used for Generating Text and Image Embedding https://huggingface.co/BridgeTower/bridgetower-large-itm-mlm-itc @@ -196,8 +207,8 @@ LLaVa is a multimodal model that supports vision and language models combined. _**This Model is required to be used with the `/chat/completions` vision endpoint. Most of the SDKs will not ask you to provide model because it's using this one.**_ -**Type**: Vision Text Generation -**Use Case**: Used for Generating Text from Text and Image Inputs +**Type:** Vision Text Generation +**Use Case:** Used for Generating Text from Text and Image Inputs https://huggingface.co/llava-hf/llava-1.5-7b-hf @@ -214,9 +225,9 @@ with an improved focus on longer context lengths. This allows for more accuracy in areas that require a longer context window, along with being an improved version of the previous Hermes and Llama line of models. -**Type**: Chat -**Use Case**: Instruction Following or Chat-Like Applications -**Prompt Format**: [ChatML](/options/prompts#chatml) +**Type:** Chat +**Use Case:** Instruction Following or Chat-Like Applications +**Prompt Format:** [ChatML](/options/prompts#chatml) https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B diff --git a/fern/docs/pages/options/prompts.mdx b/fern/docs/pages/options/prompts.mdx index 2479256..ca6219c 100644 --- a/fern/docs/pages/options/prompts.mdx +++ b/fern/docs/pages/options/prompts.mdx @@ -90,20 +90,3 @@ appropriate information, and do not keep the curly braces) {context or user message} ### Response: ``` - -## Llama-3-SQLCoder - -(Replace the portions of the prompt below in curly braces `{...}` with the -appropriate information, and do not keep the curly braces) - -``` -<|begin_of_text|><|start_header_id|>user<|end_header_id|> - -Generate a SQL query to answer this question: {user_question} -{instructions} - -DDL statements: -{create_table_statements}<|eot_id|><|start_header_id|>assistant<|end_header_id|> - -The following SQL query best answers the question {user_question}: -``` diff --git a/fern/docs/pages/usingllms/embeddings.mdx b/fern/docs/pages/usingllms/embeddings.mdx index 69b0afb..27df3f1 100644 --- a/fern/docs/pages/usingllms/embeddings.mdx +++ b/fern/docs/pages/usingllms/embeddings.mdx @@ -4,6 +4,38 @@ subtitle: Embeddings Endpoint At Prediction Guard, we offer an embedding endpoint capable of generating embeddings for both text and images. This feature is particularly useful when you want to load embeddings into a vector database for performing semantically similar searches etc. +## Text + +The multilingual-e5-large-instruct model is a lightweight embeddings model capable of embedding text. It supports 100 languages and a context length of 512. Here is a simple example of how to make a call to the embeddings endpoint using this model. + +```Python +import os +import json + +from predictionguard import PredictionGuard + +# Set your Prediction Guard token as an environmental variable. +os.environ["PREDICTIONGUARD_API_KEY"] = "" + +client = PredictionGuard() + +response = client.embeddings.create( + model="multilingual-e5-large-instruct", + input="I love to learn and use LLMs." +) + +print(json.dumps( + response, + sort_keys=True, + indent=4, + separators=(',', ': ') +)) +``` + +This will yield a json object with the embedding. + +## Multimodal + The Bridgetower model is a cross-modal encoder that handles both images and text. Here is a simple illustration of how to make a call to the embeddings endpoint with both image and text inputs. This endpoint accepts image URL, local image files, data URIs, and base64 encoded image strings as input. ## Embeddings for text and image diff --git a/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml b/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml index 54ac610..0c8ec3e 100644 --- a/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml +++ b/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml @@ -42,20 +42,23 @@ paths: type: string description: The chat model to use for generating completions. messages: - type: array - description: An array of messages used for generating completions. - items: - required: - - role - - content - type: object - properties: - role: - type: string - description: The role of the sender (user or assistant). - content: - type: string - description: The content of the message. + oneOf: + - type: string + description: A string of the message used for generating completions. + - type: array + description: An array of messages used for generating completions. + items: + required: + - role + - content + type: object + properties: + role: + type: string + description: The role of the sender (user or assistant). + content: + type: string + description: The content of the message. max_tokens: type: integer description: The maximum number of tokens in the generated completion. @@ -204,7 +207,6 @@ paths: - "Hermes-3-Llama-3.1-70B" - "Hermes-2-Pro-Mistral-7B" - "neural-chat-7b-v3-3" - - "llama-3-sqlcoder-8b" - "Hermes-3-Llama-3.1-8B" - "Hermes-2-Pro-Llama-3-8B" security: @@ -227,20 +229,23 @@ paths: type: string description: The chat model to use for generating completions. messages: - type: array - description: An array of messages used for generating completions. - items: - required: - - role - - content - type: object - properties: - role: - type: string - description: The role of the sender (user or assistant). - content: - type: string - description: The content of the message. + oneOf: + - type: string + description: A string of the message used for generating completions. + - type: array + description: An array of messages used for generating completions. + items: + required: + - role + - content + type: object + properties: + role: + type: string + description: The role of the sender (user or assistant). + content: + type: string + description: The content of the message. max_tokens: type: integer description: The maximum number of tokens in the generated completion. @@ -725,7 +730,6 @@ paths: - "deepseek-coder-6.7b-instruct" - "Hermes-3-Llama-3.1-8B" - "Hermes-3-Llama-3.1-70B" - - "llama-3-sqlcoder-8b" security: - bearerAuth: [] @@ -744,22 +748,33 @@ paths: properties: model: type: string - description: The model to use for generating vectors. Must be `bridgetower-large-itm-mlm-itc` for now. + description: The model to use for generating vectors. input: - type: array - description: An array of text and or images. - items: - type: object - properties: - text: - type: string - description: The text to vectorize. You can choose to provide this or not. - image: - type: string - description: The base64 encoding of an image. You can choose to provide this or not. + oneOf: + - type: string + description: A string of text to be embedded. + - type: array + description: An array of strings or objects containing the text and/or images to be embedded. + items: + oneOf: + - type: string + description: A string of text to be embedded. + - type: object + properties: + text: + type: string + description: The text to vectorize. You can choose to provide this or not. + image: + type: string + description: The base64 encoding of an image. You can choose to provide this or not. examples: basic: - summary: A basic example of using the API. + summary: A text example of using the API. + value: + model: "multilingual-e5-large-instruct" + input: "A person is ironing something while standing on the back of a taxi." + multimodal: + summary: A multimodal example of using the API. value: model: "bridgetower-large-itm-mlm-itc" input: @@ -824,13 +839,13 @@ paths: items: type: number example: - id: "emb-71da76cc-73a0-46be-a965-5159e8c47a1d" + id: "emb-5b310173-3cc9-4470-aa3b-7503aacb4f38" object: "list" - created: 1727891112 - model: "bridgetower-large-itm-mlm-itc" + created: 1729115349 + model: "multilingual-e5-large-instruct" data: - index: 0 - embedding: [-0.04457271471619606, -0.007496959064155817] + embedding: [0.0150606595, 0.04376322] security: - bearerAuth: [] get: @@ -849,6 +864,7 @@ paths: example1: value: - "bridgetower-large-itm-mlm-itc" + - "multilingual-e5-large-instruct" security: - bearerAuth: [] From 0878ccaf357264a81230ed7411367f2352168463 Mon Sep 17 00:00:00 2001 From: jmansdorfer Date: Wed, 16 Oct 2024 18:33:53 -0400 Subject: [PATCH 2/4] fixing formatting bugs --- fern/docs/pages/options/models.mdx | 56 +++++++++---------- fern/docs/pages/usingllms/embeddings.mdx | 34 +---------- ...ard-Prediction-Guard-API-1.0-resolved.yaml | 15 ++--- 3 files changed, 37 insertions(+), 68 deletions(-) diff --git a/fern/docs/pages/options/models.mdx b/fern/docs/pages/options/models.mdx index 45a99b1..6ba7792 100644 --- a/fern/docs/pages/options/models.mdx +++ b/fern/docs/pages/options/models.mdx @@ -14,9 +14,9 @@ with an improved focus on longer context lengths. This allows for more accuracy in areas that require a longer context window, along with being an improved version of the previous Hermes and Llama line of models. -**Type:** Chat -**Use Case:** Instruction Following or Chat-Like Applications -**Prompt Format:** [ChatML](/options/prompts#chatml) +**Type**: Chat +**Use Case**: Instruction Following or Chat-Like Applications +**Prompt Format**: [ChatML](/options/prompts#chatml) https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B @@ -37,9 +37,9 @@ A general use model that maintains excellent general task and conversation capabilities while excelling at JSON Structured Outputs and improving on several other metrics. -**Type:** Chat -**Use Case:** Instruction Following or Chat-Like Applications -**Prompt Format:** [ChatML](/options/prompts#chatml) +**Type**: Chat +**Use Case**: Instruction Following or Chat-Like Applications +**Prompt Format**: [ChatML](/options/prompts#chatml) https://huggingface.co/NousResearch/Hermes-2-Pro-Llama-3-8B @@ -64,9 +64,9 @@ billion parameter count, enabling it to perform in-depth data analysis and support complex decision-making processes. This model is designed to process large volumes of data, uncover hidden patterns, and provide actionable insights. -**Type:** Text Generation -**Use Case:** Generating Output in Response to Arbitrary Instructions -**Prompt Format:** [Alpaca](/options/prompts#alpaca) +**Type**: Text Generation +**Use Case**: Generating Output in Response to Arbitrary Instructions +**Prompt Format**: [Alpaca](/options/prompts#alpaca) https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b @@ -92,9 +92,9 @@ excels in delivering accurate and contextually relevant responses, making it ide for a wide range of applications, including chatbots, language translation, content creation, and more. -**Type:** Chat -**Use Case:** Instruction Following or Chat-Like Applications -**Prompt Format:** [ChatML](/options/prompts#chatml) +**Type**: Chat +**Use Case**: Instruction Following or Chat-Like Applications +**Prompt Format**: [ChatML](/options/prompts#chatml) https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B @@ -116,9 +116,9 @@ reliable and easy to parse. Learn more about prompting below. A revolutionary AI model for performing digital conversations. -**Type:** Chat -**Use Case:** Instruction Following or Chat-Like Applications -**Prompt Format:** [Neural Chat](/options/prompts#neural-chat) +**Type**: Chat +**Use Case**: Instruction Following or Chat-Like Applications +**Prompt Format**: [Neural Chat](/options/prompts#neural-chat) https://huggingface.co/Intel/neural-chat-7b-v3-3 @@ -135,9 +135,9 @@ from mistralai/Mistral-7B-v-0.1. For more information, refer to the blog DeepSeek Coder is a capable coding model trained on two trillion code and natural language tokens. -**Type:** Code Generation -**Use Case:** Generating Computer Code or Answering Tech Questions -**Prompt Format:** [Deepseek](/options/prompts#deepseek) +**Type**: Code Generation +**Use Case**: Generating Computer Code or Answering Tech Questions +**Prompt Format**: [Deepseek](/options/prompts#deepseek) https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-instruct @@ -154,8 +154,8 @@ on multiple programming languages and various benchmarks. Multilingual-e5 is a multilingual model for creating text embeddings in multiple languages. -**Type:** Embedding Generation -**Use Case:** Used for Generating Text Embeddings +**Type**: Embedding Generation +**Use Case**: Used for Generating Text Embeddings https://huggingface.co/intfloat/multilingual-e5-large-instruct @@ -182,8 +182,8 @@ comparable quality to leading English-only models while offering a multilingual BridgeTower is a multimodal model for creating joint embeddings between images and text. -**Type:** Embedding Generation -**Use Case:** Used for Generating Text and Image Embedding +**Type**: Embedding Generation +**Use Case**: Used for Generating Text and Image Embedding https://huggingface.co/BridgeTower/bridgetower-large-itm-mlm-itc @@ -207,8 +207,8 @@ LLaVa is a multimodal model that supports vision and language models combined. _**This Model is required to be used with the `/chat/completions` vision endpoint. Most of the SDKs will not ask you to provide model because it's using this one.**_ -**Type:** Vision Text Generation -**Use Case:** Used for Generating Text from Text and Image Inputs +**Type**: Vision Text Generation +**Use Case**: Used for Generating Text from Text and Image Inputs https://huggingface.co/llava-hf/llava-1.5-7b-hf @@ -218,16 +218,16 @@ language model, based on the transformer architecture. ## Hermes-3-Llama-3.1-70B (beta) -**Note:** This model should be considered beta/experimental as of now. Please let us know if you have any issues via [Discord](https://discord.gg/TFHgnhAFKd). +**Note**: This model should be considered beta/experimental as of now. Please let us know if you have any issues via [Discord](https://discord.gg/TFHgnhAFKd). This is a general use model that excels at reasoning and multi-turn conversations, with an improved focus on longer context lengths. This allows for more accuracy and recall in areas that require a longer context window, along with being an improved version of the previous Hermes and Llama line of models. -**Type:** Chat -**Use Case:** Instruction Following or Chat-Like Applications -**Prompt Format:** [ChatML](/options/prompts#chatml) +**Type**: Chat +**Use Case**: Instruction Following or Chat-Like Applications +**Prompt Format**: [ChatML](/options/prompts#chatml) https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B diff --git a/fern/docs/pages/usingllms/embeddings.mdx b/fern/docs/pages/usingllms/embeddings.mdx index 27df3f1..5878bde 100644 --- a/fern/docs/pages/usingllms/embeddings.mdx +++ b/fern/docs/pages/usingllms/embeddings.mdx @@ -38,8 +38,6 @@ This will yield a json object with the embedding. The Bridgetower model is a cross-modal encoder that handles both images and text. Here is a simple illustration of how to make a call to the embeddings endpoint with both image and text inputs. This endpoint accepts image URL, local image files, data URIs, and base64 encoded image strings as input. -## Embeddings for text and image - ```Python import os import json @@ -71,37 +69,7 @@ print(json.dumps( This will yield a json object with the embedding. -## Embeddings for text only - -```Python -import os -import json - -from predictionguard import PredictionGuard - -# Set your Prediction Guard token as an environmental variable. -os.environ["PREDICTIONGUARD_API_KEY"] = "" - -client = PredictionGuard() - -response = client.embeddings.create( - model="bridgetower-large-itm-mlm-itc", - input=[ - { - "text": "Tell me a joke.", - } - ] -) - -print(json.dumps( - response, - sort_keys=True, - indent=4, - separators=(',', ': ') -)) -``` - -## Embeddings for Image only +### Embeddings for Image only ```Python import os diff --git a/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml b/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml index 0c8ec3e..b69a4c9 100644 --- a/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml +++ b/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml @@ -760,13 +760,14 @@ paths: - type: string description: A string of text to be embedded. - type: object - properties: - text: - type: string - description: The text to vectorize. You can choose to provide this or not. - image: - type: string - description: The base64 encoding of an image. You can choose to provide this or not. + object: + properties: + text: + type: string + description: The text to vectorize. You can choose to provide this or not. + image: + type: string + description: The base64 encoding of an image. You can choose to provide this or not. examples: basic: summary: A text example of using the API. From 5f28be230e2a5ee18a5f664ac7d4ef8ae139f7fa Mon Sep 17 00:00:00 2001 From: jmansdorfer Date: Wed, 16 Oct 2024 18:47:38 -0400 Subject: [PATCH 3/4] updating more formatting --- fern/docs/pages/options/models.mdx | 56 +++++++++---------- ...ard-Prediction-Guard-API-1.0-resolved.yaml | 15 +++-- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/fern/docs/pages/options/models.mdx b/fern/docs/pages/options/models.mdx index 6ba7792..0cc593f 100644 --- a/fern/docs/pages/options/models.mdx +++ b/fern/docs/pages/options/models.mdx @@ -14,9 +14,9 @@ with an improved focus on longer context lengths. This allows for more accuracy in areas that require a longer context window, along with being an improved version of the previous Hermes and Llama line of models. -**Type**: Chat -**Use Case**: Instruction Following or Chat-Like Applications -**Prompt Format**: [ChatML](/options/prompts#chatml) +**Type:** Chat\ +**Use Case:** Instruction Following or Chat-Like Applications\ +**Prompt Format:** [ChatML](/options/prompts#chatml)\ https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B @@ -37,9 +37,9 @@ A general use model that maintains excellent general task and conversation capabilities while excelling at JSON Structured Outputs and improving on several other metrics. -**Type**: Chat -**Use Case**: Instruction Following or Chat-Like Applications -**Prompt Format**: [ChatML](/options/prompts#chatml) +**Type:** Chat\ +**Use Case:** Instruction Following or Chat-Like Applications\ +**Prompt Format:** [ChatML](/options/prompts#chatml)\ https://huggingface.co/NousResearch/Hermes-2-Pro-Llama-3-8B @@ -64,9 +64,9 @@ billion parameter count, enabling it to perform in-depth data analysis and support complex decision-making processes. This model is designed to process large volumes of data, uncover hidden patterns, and provide actionable insights. -**Type**: Text Generation -**Use Case**: Generating Output in Response to Arbitrary Instructions -**Prompt Format**: [Alpaca](/options/prompts#alpaca) +**Type:** Text Generation\ +**Use Case:** Generating Output in Response to Arbitrary Instructions\ +**Prompt Format:** [Alpaca](/options/prompts#alpaca)\ https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b @@ -92,9 +92,9 @@ excels in delivering accurate and contextually relevant responses, making it ide for a wide range of applications, including chatbots, language translation, content creation, and more. -**Type**: Chat -**Use Case**: Instruction Following or Chat-Like Applications -**Prompt Format**: [ChatML](/options/prompts#chatml) +**Type:** Chat\ +**Use Case:** Instruction Following or Chat-Like Applications\ +**Prompt Format:** [ChatML](/options/prompts#chatml)\ https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B @@ -116,9 +116,9 @@ reliable and easy to parse. Learn more about prompting below. A revolutionary AI model for performing digital conversations. -**Type**: Chat -**Use Case**: Instruction Following or Chat-Like Applications -**Prompt Format**: [Neural Chat](/options/prompts#neural-chat) +**Type:** Chat\ +**Use Case:** Instruction Following or Chat-Like Applications\ +**Prompt Format:** [Neural Chat](/options/prompts#neural-chat)\ https://huggingface.co/Intel/neural-chat-7b-v3-3 @@ -135,9 +135,9 @@ from mistralai/Mistral-7B-v-0.1. For more information, refer to the blog DeepSeek Coder is a capable coding model trained on two trillion code and natural language tokens. -**Type**: Code Generation -**Use Case**: Generating Computer Code or Answering Tech Questions -**Prompt Format**: [Deepseek](/options/prompts#deepseek) +**Type:** Code Generation\ +**Use Case:** Generating Computer Code or Answering Tech Questions\ +**Prompt Format:** [Deepseek](/options/prompts#deepseek)\ https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-instruct @@ -154,8 +154,8 @@ on multiple programming languages and various benchmarks. Multilingual-e5 is a multilingual model for creating text embeddings in multiple languages. -**Type**: Embedding Generation -**Use Case**: Used for Generating Text Embeddings +**Type:** Embedding Generation\ +**Use Case:** Used for Generating Text Embeddings\ https://huggingface.co/intfloat/multilingual-e5-large-instruct @@ -182,8 +182,8 @@ comparable quality to leading English-only models while offering a multilingual BridgeTower is a multimodal model for creating joint embeddings between images and text. -**Type**: Embedding Generation -**Use Case**: Used for Generating Text and Image Embedding +**Type:** Embedding Generation\ +**Use Case:** Used for Generating Text and Image Embedding\ https://huggingface.co/BridgeTower/bridgetower-large-itm-mlm-itc @@ -207,8 +207,8 @@ LLaVa is a multimodal model that supports vision and language models combined. _**This Model is required to be used with the `/chat/completions` vision endpoint. Most of the SDKs will not ask you to provide model because it's using this one.**_ -**Type**: Vision Text Generation -**Use Case**: Used for Generating Text from Text and Image Inputs +**Type:** Vision Text Generation\ +**Use Case:** Used for Generating Text from Text and Image Inputs\ https://huggingface.co/llava-hf/llava-1.5-7b-hf @@ -218,16 +218,16 @@ language model, based on the transformer architecture. ## Hermes-3-Llama-3.1-70B (beta) -**Note**: This model should be considered beta/experimental as of now. Please let us know if you have any issues via [Discord](https://discord.gg/TFHgnhAFKd). +**Note:** This model should be considered beta/experimental as of now. Please let us know if you have any issues via [Discord](https://discord.gg/TFHgnhAFKd). This is a general use model that excels at reasoning and multi-turn conversations, with an improved focus on longer context lengths. This allows for more accuracy and recall in areas that require a longer context window, along with being an improved version of the previous Hermes and Llama line of models. -**Type**: Chat -**Use Case**: Instruction Following or Chat-Like Applications -**Prompt Format**: [ChatML](/options/prompts#chatml) +**Type:** Chat\ +**Use Case:** Instruction Following or Chat-Like Applications\ +**Prompt Format:** [ChatML](/options/prompts#chatml)\ https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B diff --git a/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml b/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml index b69a4c9..0c8ec3e 100644 --- a/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml +++ b/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml @@ -760,14 +760,13 @@ paths: - type: string description: A string of text to be embedded. - type: object - object: - properties: - text: - type: string - description: The text to vectorize. You can choose to provide this or not. - image: - type: string - description: The base64 encoding of an image. You can choose to provide this or not. + properties: + text: + type: string + description: The text to vectorize. You can choose to provide this or not. + image: + type: string + description: The base64 encoding of an image. You can choose to provide this or not. examples: basic: summary: A text example of using the API. From 3de2ad3e3d9a04b75bbc46ee62ffb04e8c8e08af Mon Sep 17 00:00:00 2001 From: edmcquinn <73904683+edmcquinn@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:56:57 -0400 Subject: [PATCH 4/4] Adding description and also adding enumerations page link in api section Adding description and also adding enumerations page link in api section --- fern/docs.yml | 4 +++ ...ard-Prediction-Guard-API-1.0-resolved.yaml | 35 ++++++++++--------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/fern/docs.yml b/fern/docs.yml index bc3ebcb..ddb4d39 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -94,6 +94,10 @@ navigation: layout: - api: API Reference display-errors: true + - section: Valid Inputs + contents: + - page: Enumerations for API + path: ./docs/pages/options/enumerations.mdx - section: SDK Reference contents: - page: Chat diff --git a/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml b/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml index 0c8ec3e..7d06b0e 100644 --- a/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml +++ b/fern/openapi/Prediction-Guard-Prediction-Guard-API-1.0-resolved.yaml @@ -43,22 +43,22 @@ paths: description: The chat model to use for generating completions. messages: oneOf: - - type: string - description: A string of the message used for generating completions. - - type: array - description: An array of messages used for generating completions. - items: - required: - - role - - content - type: object - properties: - role: - type: string - description: The role of the sender (user or assistant). - content: - type: string - description: The content of the message. + - type: string + description: A string of the message used for generating completions. + - type: array + description: An array of messages used for generating completions. + items: + required: + - role + - content + type: object + properties: + role: + type: string + description: The role of the sender (user or assistant). + content: + type: string + description: The content of the message. max_tokens: type: integer description: The maximum number of tokens in the generated completion. @@ -124,7 +124,7 @@ paths: type: string description: Description of the error. example: - error: "api understands the request but refuses to authorize it" + error: "api understands the request but refuses to authorize it" "400": description: General error response. content: @@ -760,6 +760,7 @@ paths: - type: string description: A string of text to be embedded. - type: object + description: Use this option for multimodal input. properties: text: type: string