-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Streamline all existing docs (#792)
* Update all docs * remove * new file * add tool auth docs * lint * remove langchain docs * remove calc
- Loading branch information
1 parent
b851a07
commit 8ce9762
Showing
23 changed files
with
841 additions
and
1,003 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,41 @@ | ||
# OSS Toolkit Contributing Guide | ||
|
||
Thank you for your interest in contributing to Cohere's OSS toolkit. This guide will help explain the contribution workflow from opening an issue, creating a PR, to reviewing and merging your added changes. For development setup, please refer to the [README](README.md). | ||
Thank you for your interest in contributing to Cohere's OSS toolkit. This guide covers the contribution workflow, from opening an issue to reviewing and merging changes. For development setup, please refer to the [README](README.md). | ||
|
||
# Getting Started | ||
## Getting Started | ||
|
||
Remember that there are many ways to contribute other than writing code: writing tutorials or blog posts, improving [the documentation](https://docs.cohere.com), and submitting bug reports. | ||
There are many ways to contribute beyond writing code. You can help by: | ||
- Writing tutorials or blog posts | ||
- Improving [the documentation](https://docs.cohere.com) | ||
- Submitting bug reports | ||
|
||
## Table of Contents | ||
|
||
- [Assumptions](#assumptions) | ||
- [How to Contribute](#how-to-contribute) | ||
- [How to Add Features](#how-to-add-features) | ||
|
||
## Assumptions | ||
|
||
1. **You're familiar with [GitHub](https://github.com) and the [Pull Requests (PR)](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) workflow.** | ||
2. **You've read the Cohere's [documentation](https://docs.cohere.com).** | ||
3. **You know about the [Cohere community on Discord](https://discord.com/invite/co-mmunity).** | ||
Before contributing, please ensure: | ||
1. You're familiar with [GitHub](https://github.com) and the [Pull Request (PR)](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) workflow. | ||
2. You've read [Cohere's documentation](https://docs.cohere.com). | ||
3. You know about the [Cohere community on Discord](https://discord.com/invite/co-mmunity). | ||
|
||
## How to Contribute | ||
|
||
1. Ensure your change has an issue! Find an existing issue or open a new issue. | ||
- This is where you can get a feel if the change will be accepted or not. | ||
2. Once approved, fork this repository repository in your own GitHub account. | ||
3. [Fork this repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) | ||
4. Make your changes on your fork and make sure all your [commits are signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)! | ||
5. [Submit the fork as a Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) pointing to the `main` branch this repository. A maintainer should comment and/or review your Pull Request within a few days. Although depending on the circumstances, it may take longer. | ||
1. **Open or Find an Issue** | ||
Ensure your contribution addresses an open issue. This helps gauge if the change will be accepted. | ||
|
||
2. **Fork the Repository** | ||
[Fork this repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) to your GitHub account. | ||
|
||
3. **Make Your Changes** | ||
Work on your fork and ensure [your commits are signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification). | ||
|
||
## How to add features | ||
4. **Submit a Pull Request (PR)** | ||
[Submit your fork as a PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) pointing to the `main` branch. A maintainer will review your PR, but response times may vary. | ||
|
||
All features must be added to the `community` folder. That's where you'll find tools and deployments that are not managed by Codeowners. | ||
## How to Add Features | ||
|
||
Add new features to the `community` folder. This is where tools and deployments not managed by Codeowners are located. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
# Command Model Provider Guides | ||
|
||
A model deployment is a running version of one of the Cohere command models. The Toolkit currently supports the model deployments: | ||
A **model deployment** refers to an active instance of one of the Cohere command models. The Toolkit currently supports the following model deployment options: | ||
|
||
## Command Model Provider Options | ||
|
||
- Cohere Platform (model_deployments/cohere_platform.py) | ||
- This model deployment option call the Cohere Platform with the [Cohere python SDK](https://github.com/cohere-ai/cohere-python). You will need a Cohere API key. When you create an account with Cohere, we automatically create a trial API key for you. You can find it [here](https://dashboard.cohere.com/api-keys). | ||
- Azure (model_deployments/azure.py) | ||
- This model deployment calls into your Azure deployment. To get an Azure deployment [follow these steps](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-command). Once you have a model deployed you will need to get the endpoint URL and API key from the azure AI studio https://ai.azure.com/build/ -> Project -> Deployments -> Click your deployment -> You will see your URL and API Key. Note to use the Cohere SDK you need to add `/v1` to the end of the url. | ||
- SageMaker (model_deployments/sagemaker.py) | ||
- This deployment option calls into your SageMaker deployment. To create a SageMaker endpoint [follow the steps here](https://docs.cohere.com/docs/amazon-sagemaker-setup-guide), alternatively [follow a command notebook here](https://github.com/cohere-ai/cohere-aws/tree/main/notebooks/sagemaker). Note your region and endpoint name when executing the notebook as these will be needed in the environment variables. | ||
- Local models with LlamaCPP (community/model_deployments/local_model.py) | ||
- This deployment option calls into a local model. To use this deployment you will need to download a model. You can use Cohere command models or choose between a range of other models that you can see [here](https://github.com/ggerganov/llama.cpp). You will need to enable community features to use this deployment by setting `USE_COMMUNITY_FEATURES=True` in your .env file. | ||
- To add your own deployment: | ||
1. Create a deployment file, add it to [/community/model_deployments](https://github.com/cohere-ai/cohere-toolkit/tree/main/src/community/model_deployments) folder, implement the function calls from `BaseDeployment` similar to the other deployments. | ||
2. Add the deployment to [src/community/config/deployments.py](https://github.com/cohere-ai/cohere-toolkit/blob/main/src/community/config/deployments.py) | ||
3. Add the environment variables required to the env template. | ||
- To add a Cohere private deployment, use the steps above copying the cohere platform implementation changing the base_url for your private deployment and add in custom auth steps. | ||
- **Cohere Platform** (`model_deployments/cohere_platform.py`) | ||
- This deployment option utilizes the [Cohere Python SDK](https://github.com/cohere-ai/cohere-python) to interface with the Cohere Platform. You will need a Cohere API key, which is automatically generated when you create an account. You can find your API key [here](https://dashboard.cohere.com/api-keys). | ||
|
||
- **Azure** (`model_deployments/azure.py`) | ||
- This option connects to your Azure deployment. To set up an Azure deployment, follow the instructions [here](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-command). After deploying a model, retrieve the endpoint URL and API key from Azure AI Studio: navigate to [https://ai.azure.com/build/](https://ai.azure.com/build/) -> Project -> Deployments -> Click your deployment to access the URL and API Key. Remember to append `/v1` to the endpoint URL when using the Cohere SDK. | ||
|
||
- **SageMaker** (`model_deployments/sagemaker.py`) | ||
- This deployment option connects to your SageMaker endpoint. For setup instructions, refer to the [SageMaker setup guide](https://docs.cohere.com/docs/amazon-sagemaker-setup-guide) or use the command notebook available [here](https://github.com/cohere-ai/cohere-aws/tree/main/notebooks/sagemaker). Note your AWS region and endpoint name when executing the notebook, as these will be required as environment variables. | ||
|
||
- **Local Models with LlamaCPP** (`community/model_deployments/local_model.py`) | ||
- This option enables the use of a local model. To implement this deployment, download a model of your choice. You can use Cohere command models or explore other available models [here](https://github.com/ggerganov/llama.cpp). Enable community features by setting `USE_COMMUNITY_FEATURES=True` in your `.env` file. | ||
|
||
## Adding Your Own Deployment | ||
|
||
1. Create a deployment file and place it in the [/community/model_deployments](https://github.com/cohere-ai/cohere-toolkit/tree/main/src/community/model_deployments) folder. Implement the function calls from `BaseDeployment`, mirroring the existing deployment structures. | ||
2. Register your deployment in [src/community/config/deployments.py](https://github.com/cohere-ai/cohere-toolkit/blob/main/src/community/config/deployments.py). | ||
3. Add any required environment variables to the `.env` template. | ||
|
||
## Adding a Cohere Private Deployment | ||
|
||
To add a Cohere private deployment, replicate the steps above for the Cohere Platform implementation, adjusting the `base_url` for your private deployment and incorporating any custom authentication steps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.