How to Run DBRS Instruct with Ollama and Build an AI App with Anakin AI

In this comprehensive guide, we'll explore how to run the powerful Llama 3 8b language model locally using Ollama, and then leverage Anakin AI to build custom AI applications without any coding required.

1000+ Pre-built AI Apps for Any Use Case

How to Run DBRS Instruct with Ollama and Build an AI App with Anakin AI

Start for free
Contents

Running DBRX Instruct with Ollama

DBRX is an open, general-purpose large language model (LLM) created by Databricks. It is a transformer-based decoder-only model trained using next-token prediction, with a fine-grained mixture-of-experts (MoE) architecture and 132 billion total parameters, of which 36 billion parameters are active on any input.

Step 1: Install Ollama (if not already installed)

If you haven't installed Ollama yet, follow the instructions for your operating system (macOS, Linux, or Windows) from the official Ollama website (https://ollama.com/download).

Step 2: Run DBRX Instruct

Once Ollama is installed, open your terminal or command prompt and run the following command to start DBRX Instruct:

ollama run dbrx:instruct

This command will download and load the DBRX Instruct model. Wait a few minutes while the model is downloaded and loaded, and then you'll be presented with a chat prompt similar to this:

ollama run dbrx:instruct

>>> What is the capital of France?

The capital of France is Paris.

>>> Can you explain the concept of machine learning?

Sure, machine learning is a field of artificial intelligence that involves developing algorithms and statistical models that enable computer systems to perform specific tasks effectively without being explicitly programmed. Instead of following a set of predefined rules, machine learning algorithms use data to learn patterns and make decisions or predictions.

The process typically involves providing the algorithm with a large amount of training data, which it analyzes to identify patterns and relationships. Based on this analysis, the algorithm builds a model that can then be used to make predictions or decisions on new, unseen data.

>>> /bye

You can now interact with DBRX Instruct by typing your queries or prompts, and the model will generate responses based on its training.

Step 3: Explore DBRX Instruct's Capabilities

DBRX Instruct is a powerful LLM that excels at various tasks, including:

Question Answering: You can ask DBRX Instruct questions on a wide range of topics, and it will provide accurate and detailed answers based on its training data.

Text Generation: DBRX Instruct can generate high-quality text content, such as articles, stories, or scripts, based on your prompts or instructions.

Code Generation: As a capable code model, DBRX Instruct can assist you with programming tasks by generating code snippets or explaining programming concepts.

Data Analysis: DBRX Instruct can help you analyze and interpret data by providing insights, summaries, and visualizations based on your input.

Task Assistance: You can use DBRX Instruct as a virtual assistant to help you with various tasks, such as research, planning, or decision-making.

Remember, DBRX Instruct is a general-purpose LLM, so its capabilities are not limited to the examples mentioned above. Feel free to explore and experiment with different prompts and tasks to discover its full potential.

Building AI Apps with Anakin AI's API Integration

Anakin AI offers comprehensive API services for all applications, empowering developers and organizations to seamlessly integrate and enhance their projects using Anakin AI's APIs. By leveraging these APIs, users gain the flexibility to easily access Anakin AI's robust product features within their own applications.

💡
Interested in the latest trend in AI?

Then, You cannot miss out Anakin AI!

Anakin AI is an all-in-one platform for all your workflow automation, create powerful AI App with an easy-to-use No Code App Builder, with Llama 3, Claude, GPT-4, Uncensored LLMs, Stable Diffusion...

Build Your Dream AI App within minutes, not weeks with Anakin AI!

Advantages of API Integration

Rapid Development: Rapidly develop AI applications tailored to your business needs using Anakin AI's intuitive visual interface, with real-time implementation across all clients.

Model Flexibility: Support for multiple AI model providers, allowing you the flexibility to switch providers as needed.

Streamlined Access: Pre-packaged access to the essential functionalities of the AI model, reducing development overhead.

Future-Proof: Stay ahead of the curve with upcoming advanced features available through the API.

How to Use the API

Step 1: Upgrade Your Plan and Check Your Account Credits

Anakin AI's API service is currently exclusively available to subscribers. While using the AI model through API calls, credits from your account balance will be consumed.

To check your subscription status or upgrade your plan, navigate to the Anakin AI Web App. Click on the avatar located in the lower left corner to access the Upgrade page. Please ensure that your current account has sufficient credits.

Step 2: Test Your App

Now, to test the app, select the app and click the "Generate" button. Confirm it runs properly and produces the expected output before proceeding.

Step 3: View API Documentation and Manage API Access Tokens

Next, visit the app Integration section at the top. In this section, you can click "View Details" to view the API documentation provided by Anakin AI, manage access tokens, and view the App ID.

Step 4: Generate Your API Access Token

Click the "Manage Token" button to manage your API Access token and select "New Token" to generate your API access token.

Complete the following token configuration, then click "Save and generate token," and finally copy and save the API Access Token securely.

NOTE: The generated API access token will only be displayed once. Make sure to copy and save it securely right away. A best practice is to expose API keys in plaintext through backend calls rather than directly in frontend code or requests. This helps prevent abuse or attacks on your app.

You can create multiple API Access Tokens for an app to distribute it among different users or developers. This ensures that while users of the API can access the AI capabilities provided by the app developer, the underlying Prompt engineering and other tool capabilities remain intact.

Quick App API Example

A quick app allows you to generate high-quality text content such as blog posts, translations, and other creative content. By calling the "Run a Quick App API," the user input content is sent, and the generated text result is obtained.

The model parameters and prompt template used to generate text depend on the input settings in the Anakin AI App -> Manage -> Design Page.

You can find the API documentation and request examples for the app in App -> Integration -> API List -> View Details.

Here's an API call example to create text completion information:

curl --location --request POST 'https://api.anakin.ai/v1/quickapps/{{appId}}/runs' \
--header 'Authorization: Bearer ANAKINAI_API_ACCESS_TOKEN' \
--header 'X-Anakin-Api-Version: 2024-05-06' \
--header 'Content-Type: application/json' \
--data-raw '{
    "inputs": {
        "Product/Service": "Cloud Service",
        "Features": "Reliability and performance.",
        "Advantages": "Efficiency",
        "Framework": "Attention-Interest-Desire-Action"
    },
    "stream": true
}'

TIP: Remember to replace the variable {{appId}} with the appId you want to request, and replace ANAKINAI_API_ACCESS_TOKEN with the API Access Token you generated in Step 4.

Check more details about the Quick App API in the API Reference.

Chatbot App API Example

A Chatbot app lets you create chatbots that interact with users in a natural, question-and-answer format. To start a conversation, call the "Conversation with Chatbot API," and continue to pass in the returned parameter name to maintain the conversation.

You can find the API documentation and sample requests for the app in App -> Integration -> API List -> View Details.

Here's an API call example to send conversation messages:

curl --location --request POST 'https://api.anakin.ai/v1/chatbots/{{appId}}/messages' \
--header 'Authorization: Bearer ANAKINAI_API_ACCESS_TOKEN' \
--header 'X-Anakin-Api-Version: 2024-05-06' \
--header 'Content-Type: application/json' \
--data-raw '{
    "content": "What'\''s your name? Are you the clever one?",
    "stream": true
}'

TIP: Remember to replace the variable {{appId}} with the appId you want to request, and replace ANAKINAI_API_ACCESS_TOKEN with the API Access Token you generated in Step 4.

Check more details about the Chatbot API in the API Reference.

By leveraging Anakin AI's API integration, you can seamlessly incorporate advanced AI capabilities into your projects, streamlining development processes and reducing costs associated with managing complex backend architectures and deployment processes.

In this comprehensive guide, we've explored how to run the powerful DBRX Instruct language model locally using Ollama, and how to build custom AI applications without any coding knowledge using Anakin AI's no-code platform. We've also covered Anakin AI's API integration, which empowers developers and organizations to seamlessly integrate and enhance their projects with Anakin AI's robust product features.

By combining the capabilities of these tools, you can unlock a world of possibilities for leveraging advanced natural language processing and AI technologies in your projects, streamlining workflows, and enhancing productivity. Whether you're a developer, business owner, or individual user, this guide provides you with the knowledge and resources to harness the power of AI and stay ahead of the curve in an ever-evolving technological landscape.

💡
Interested in the latest trend in AI?

Then, You cannot miss out Anakin AI!

Anakin AI is an all-in-one platform for all your workflow automation, create powerful AI App with an easy-to-use No Code App Builder, with Llama 3, Claude, GPT-4, Uncensored LLMs, Stable Diffusion...

Build Your Dream AI App within minutes, not weeks with Anakin AI!