Skip to content

Commit

Permalink
Merge branch 'main' into anirudh.shrinivason/update-i5O-case-study
Browse files Browse the repository at this point in the history
  • Loading branch information
Anirudh31415926535 authored Feb 13, 2025
2 parents 954999b + fb625e0 commit ef8f853
Show file tree
Hide file tree
Showing 22 changed files with 3,897 additions and 84 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: "Private Deployment Usage"
slug: "docs/private-deployment-usage"

hidden: false

description: "This page describes how to use Cohere's SDK to access privately deployed Cohere models."
image: "../../../assets/images/f1cc130-cohere_meta_image.jpg"
keywords: "generative AI, large language models, private deployment"

createdAt: "Mon Apr 08 2024 14:53:59 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Wed May 01 2024 16:11:36 GMT+0000 (Coordinated Universal Time)"
---

You can use Cohere's SDK to access privately deployed Cohere models.

## Installation

To install the Cohere SDK, choose from the following 4 languages:

<Tabs>
<Tab title="Python">

```bash
pip install -U cohere
```
[Source](https://github.com/cohere-ai/cohere-python)
</Tab>

<Tab title="TypeScript">

```bash
npm i -s cohere-ai
```
[Source](https://github.com/cohere-ai/cohere-typescript)

</Tab>

<Tab title="Java">

```gradle
implementation 'com.cohere:cohere-java:1.x.x'
```
[Source](https://github.com/cohere-ai/cohere-java)

</Tab>

<Tab title="Go">

```bash
go get github.com/cohere-ai/cohere-go/v2
```

[Source](https://github.com/cohere-ai/cohere-go)

</Tab>
</Tabs>

## Getting Started

The only difference between using Cohere's models on private deployments and the Cohere platform is how you set up the client. With private deployments, you need to pass the following parameters:
- `api_key` - Pass a blank value
- `base_url` - Pass the URL of your private deployment

```python PYTHON
import cohere

co = cohere.Client(
api_key="", # Leave this blank
base_url="<YOUR_DEPLOYMENT_URL>"
)
```

To get started with example use cases, refer to the following quickstart examples:
- [Text Generation (Command model)](https://docs.cohere.com/docs/text-gen-quickstart)
- [RAG (Command model)](https://docs.cohere.com/docs/rag-quickstart)
- [Tool Use (Command model)](https://docs.cohere.com/docs/tool-use-quickstart)
- [Semantic Search (Embed model)](https://docs.cohere.com/docs/sem-search-quickstart)
- [Reranking (Rerank model)](https://docs.cohere.com/docs/reranking-quickstart)

## Integrations

You can use the LangChain library with privately deployed Cohere models. Refer to the [LangChain section](https://docs.cohere.com/docs/chat-on-langchain#using-langchain-on-private-deployments) for more information on setting up LangChain for private deployments.
72 changes: 72 additions & 0 deletions fern/pages/get-started/installation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: Installation
slug: /docs/get-started-installation

description: "A guide for installing the Cohere SDK, supported in 4 different languages – Python, TypeScript, Java, and Go."
image: "../../assets/images/f1cc130-cohere_meta_image.jpg"
keywords: "Cohere, Cohere SDK, API v1"
---

## Platform options

To be able to use Cohere’s models, first choose the platform where you want to access the model from. Cohere's models are available on the following platforms:

| Platform | Description | Setup Guide |
|-----------------|-----------------------------------------------------------------------------|----------------------------------------------------------------------------|
| Cohere Platform | The fastest way to start using Cohere’s models. Hosted on Cohere infrastructure and available on our public SaaS platform. | [Sign up](https://dashboard.cohere.com/welcome/register) and get an [API key](https://dashboard.cohere.com/api-keys) (trial key available) |
| Private Deployments | For enterprises looking to deploy the Cohere stack privately on the cloud or on-prem. | [Setup guide](https://docs.cohere.com/docs/single-container-on-private-clouds) |
| Cloud deployments | Managed services from cloud providers that enable access to Cohere's models. |[Amazon Bedrock](https://docs.cohere.com/docs/amazon-bedrock#prerequisites)<br/>• [Amazon SageMaker](https://docs.cohere.com/docs/amazon-sagemaker-setup-guide#prerequisites)<br/>• [Azure AI Foundry](https://docs.cohere.com/docs/cohere-on-microsoft-azure#prerequisites)<br/>• [Oracle OCI](https://docs.cohere.com/docs/oracle-cloud-infrastructure-oci) |
## Model usage

You can then use the models via these options:

- [SDK](https://docs.cohere.com/v1/reference/about#sdks). We support the following SDKs:
- [Python](https://github.com/cohere-ai/cohere-python)
- [TypeScript](https://github.com/cohere-ai/cohere-typescript)
- [Java](https://github.com/cohere-ai/cohere-java)
- [Go](https://github.com/cohere-ai/cohere-go)
- [CLI tool](https://docs.cohere.com/v1/reference/command)
- [Playground](https://docs.cohere.com/v1/docs/playground-overview)


## Installation

To install the Cohere SDK, choose from the following 4 languages:

<Tabs>
<Tab title="Python">

```bash
pip install -U cohere
```
[Source](https://github.com/cohere-ai/cohere-python)
</Tab>

<Tab title="TypeScript">

```bash
npm i -s cohere-ai
```
[Source](https://github.com/cohere-ai/cohere-typescript)

</Tab>

<Tab title="Java">

```gradle
implementation 'com.cohere:cohere-java:1.x.x'
```
[Source](https://github.com/cohere-ai/cohere-java)

</Tab>

<Tab title="Go">

```bash
go get github.com/cohere-ai/cohere-go/v2
```

[Source](https://github.com/cohere-ai/cohere-go)

</Tab>
</Tabs>
12 changes: 4 additions & 8 deletions fern/pages/get-started/playground-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,22 @@ updatedAt: 'Wed May 29 2024 18:55:51 GMT+0000 (Coordinated Universal Time)'
---
## What is the Playground?

The [Developer Playground](https://dashboard.cohere.com/playground) is a visual interface for users to try out our APIs and iterate on prompts without writing a single line of code. Use the Playground to test your use cases and when you're ready to start building, simply click `View Code` to add Cohere's functionality to your application.
The [Cohere Playground](https://dashboard.cohere.com/playground) is a visual interface for users to try out our APIs and iterate on prompts without writing a single line of code. Use the Playground to test your use cases and when you're ready to start building, simply click `CODE` to get the code version that you can add to your application.

## Using the Playground

### Chat

The Chat API provides a natural language response to a prompt.  You can use the Chat Playground to generate text, answer a question or create content.  There is a default preamble, which you can change in the playground. The preamble and the messages are sent to the model to generate a response.
The [Chat endpoint](/reference/chat) provides a natural language response to a prompt.  You can use the Chat Playground to generate text, answer a question or create content.  There is a default preamble, which you can change in the playground. The preamble and the messages are sent to the model to generate a response.

- To write inputs that produce the best results for your use case, read our [Prompt Engineering](/docs/prompt-engineering) guide.
- Try tinkering with different [temperature](/docs/temperature)  to get different outputs.
- You can also toggle raw prompting on the playground.  If raw prompting is turned off, the user's input will be sent to the playground without any preprocessing.

<img src='../../assets/images/67f4530-Playground_-_Chat.png' />




### Embed

Using [Embed](/reference/embed) in the Playground enables users to assign numerical representations to strings and visualize comparative meaning on a 2-dimensional plane. Phrases similar in meaning should ideally be closer together on this visualization. Add a couple of your own phrases and see if the Playground visualization feels accurate to you.
The [Embed endpoint](/reference/embed) enables users to assign numerical representations to strings and visualize comparative meaning on a 2-dimensional plane. Phrases similar in meaning should ideally be closer together on this visualization. Add a couple of your own phrases and see if the Playground visualization feels accurate to you.

<img src='../../assets/images/4e876d8-Playground_-_Embed.png' />

Expand All @@ -39,7 +35,7 @@ Cohere [embeddings](/docs/embeddings) can be used to train a semantic classifier

### Classify

The Cohere [Classify](/reference/classify) endpoint enables users to create a classifier from a few labeled examples.
The [Classify endpoint](/reference/classify) enables users to create a classifier from a few labeled examples.

<img src='../../assets/images/8af00ab-Playground_-_Classify.png' />

Expand Down
Loading

0 comments on commit ef8f853

Please sign in to comment.