cohere-generate-command

Cohere's generative model is a powerful framework that enables the automatic generation of new and diverse content. Large language models (LLM) leverage generative models to produce contextually relevant text.

Input

Prompt:

Press Ctrl + Enter to submit
The maximum number of tokens to generate. Shorter token lengths will provide faster performance.
A decimal number that determines the degree of randomness in the response
Ensures only the top k most likely tokens are considered for generation at each step, Min value of 0, max value of 500.

Output

Submit a prompt for a response.

Notes

Note

This model has a special pricing applied. Find out more

Introduction

This model generates natural language that can be used for interactive autocomplete, augmenting human writing processes, summarization, text rephrasing, and other text-to-text tasks in non-sensitive domains.

Quick Start

Try asking the model to do any of the following:

  • Summarize a paragraph of text
  • Generate SEO tags for a blog post
  • Produce some questions for your next trivia night
  • Provide ideas of what to do in your city this weekend''

Run cohere Command with an API

Running the API with Clarifai's Python SDK

You can run the cohere Command Model API using Clarifai’s Python SDK.

Export your PAT as an environment variable. Then, import and initialize the API Client.

Find your PAT in your security settings.

export CLARIFAI_PAT={your personal access token}
import os

from clarifai.client.model import Model

input = '''what are the causes of pollution?'''

api_key = API_KEY
additional_command = "Generate a summary focusing on the next steps"
inference_params = dict(max_tokens= 512, top_k= 50,temperature= 0.3, api_key = api_key)

# Model Predict
model_prediction = Model("https://clarifai.com/cohere/generate/models/cohere-generate-command").predict_by_bytes(input.encode(), input_type="text", inference_params=inference_params)

print(model_prediction.outputs[0].data.text.raw)

You can also run a cohere Command API using other Clarifai Client Libraries like Java, cURL, NodeJS, PHP, etc here.

Inference Parameters

  • max_tokens: The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.
  • temperature: A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations.
  • top_k: Ensures only the top k most likely tokens are considered for generation at each step.

Examples

Prompt: Write me a poem about Leetcode.

Completion:
I am a leetcode problem,
I am here to trouble you,
I will give you a headache,
And make you want to cry.
Prompt: Extract the name of the vendor from the invoice: PURCHASE #0521 NIKE XXX3846.  

Completion: Nike is the vendor.
Prompt: Write me a product description about wireless, blue headphones for my website.  

Completion: The wireless, blue headphones are a great way 
to enjoy your music without being tethered to your phone or 
other devices. They are comfortable to wear and have a 
great sound quality. The headphones are also equipped 
with a noise-canceling feature, so you can enjoy your music 
without any distractions.

Disclaimer

Please be advised that this model utilizes wrapped Artificial Intelligence (AI) provided by Cohere (the "Vendor"). These AI models may collect, process, and store data as part of their operations. By using our website and accessing these AI models, you hereby consent to the data practices of the Vendor. We do not have control over the data collection, processing, and storage practices of the Vendor. Therefore, we cannot be held responsible or liable for any data handling practices, data loss, or breaches that may occur. It is your responsibility to review the privacy policies and terms of service of the Vendor to understand their data practices. You can access the Vendor's privacy policy and terms of service at https://cohere.city/privacy-policy/.

We disclaim all liability with respect to the actions or omissions of the Vendor, and we encourage you to exercise caution and to ensure that you are comfortable with these practices before utilizing the AI models hosted on our site.

  • ID
  • Model Type ID
    Text To Text
  • Input Type
    text
  • Output Type
    text
  • Description
    Cohere's generative model is a powerful framework that enables the automatic generation of new and diverse content. Large language models (LLM) leverage generative models to produce contextually relevant text.
  • Last Updated
    Oct 17, 2024
  • Privacy
    PUBLIC
  • Use Case
  • Toolkit
  • License
  • Share
  • Badge
    cohere-generate-command