Using Cloudera Copilot
You can use Cloudera Copilot to assist you in code generation and code completion thus providing flexibility and efficiency in the Cloudera AI workflows.
- Start a session within your project and select JupyterLab as your editor.
-
Click the
Jupyter AI Chat icon in the left navigation pane.
-
Start typing in the prompt and the Cloudera Copilot will assist you.For example, enter Help me write a fibonacci function.
Example use cases for Cloudera Copilot:
- Debugging/fixing code
- Code completion
- Explaining code or explaining errors
- Code generation
- Refer to Jupyter AI
documentation for instructions on
/ask /learn /fix
and/generate
commands.
Magic commands:
- In addition to using the chat interface, you can also use Cloudera Copilot by calling Magic Commands within your notebook. Magic commands are special lines of code that will make calls to a language model that you have configured.
- Example syntax:
%load_ext jupyter_ai_magics
%%ai anthropic.claude-3-sonnet-20240229-v1:0
def fibonacci(
- Finding model ID strings for magic commands.
- The Amazon Bedrock models recommended for Cloudera Copilot are:
- anthropic.claude-3-sonnet-20240229-v1:0
- anthropic.claude-3-opus-20240229-v1:0
- mistral.mixtral-8x7b-instruct-v0:1
- meta.llama3-70b-instruct-v1:0
- amazon.titan-embed-text-v2:0
- For Cloudera AI Inference service, the
model ID
string will be of the form:cloudera:<model_name>
. Here, themodel_name
is the samemodel ID
from the Model Endpoints details page that you added when you configured Cloudera Copilot.
- The Amazon Bedrock models recommended for Cloudera Copilot are: