# Getting Started

Qualcomm has developed a Python package known as Imagine SDK. Its purpose is to simplify
the process of creating GenAI applications. It achieves this by merging our Imagine APIs
with sophisticated Python AI frameworks like LangChain. This amalgamation facilitates
the creation of applications such as chatbots, Generative Question-Answering (GQA),
summarization, and workflow automation.

::::{grid} 2
:gutter: 2

:::{grid-item-card} {octicon}`rocket;1em;sd-text-info` How to use it
:link: how-to
:link-type: ref
The most basic example of using a Large Language Model (LLM) to generate text.
:::
:::{grid-item-card} {octicon}`download;1em;sd-text-info` Installation
:link: install
:link-type: doc
How get the Imagine SDK working on your system.
:::
:::{grid-item-card} {octicon}`book;1em;sd-text-info` Tutorials
:link: tutorials/index
:link-type: doc
Examples showcasing many typical use cases of how to use the Imagine SDK.
The code snippets are designed so that you can copy-paste and run them on your
environment.
:::
:::{grid-item-card} {octicon}`codescan;1em;sd-text-info` API documentation
:link: api/index
:link-type: doc
Documentation about every single class, method and function that Imagine SDK offers.
Great to have next to your IDE when developing code using the SDK.
:::
::::


````{only} internal
```{admonition} Coming soon
:class: attention

Imagine SDK will offer a collection of utilities and toolkits that are utilized
throughout Qualcomm.

Looking ahead, Imagine SDK plans to incorporate the use of fine-tuned models, which will
further enhance its capabilities and potential uses.
```
````

(how-to)=

## How to use it

Start with installing the Imagine SDK. Installation is a straight forward process like
installing a any python package from a wheel file. Please refer to the
[installation](install) section for steps and complete.


```{include} snippets/imagine_api_help.md
```

The following is the most basic example of using a Large Language Model (LLM) to
generate text.
It instantiates the client [`ImagineClient`](/tutorials/1_0_basic_usage) and starts a
new conversation by asking a
question.

```{literalinclude} ../examples/sync/chat_no_streaming.py
```

This will print something similar to:

```text
Spain is renowned for its rich variety of cheeses, each with its unique flavor profile
and texture. The "best" Spanish cheese is subjective and often depends on personal
taste preferences. However, here are some of the most popular and highly-regarded
Spanish cheeses:

1. Manchego: A firm, crumbly cheese made from sheep's milk, Manchego is a classic
   Spanish cheese with a nutty, slightly sweet flavor.
2. Mahon: A semi-soft cheese from the island of Minorca, Mahon has a mild,
   creamy flavor and a smooth texture.
3. Idiazabal: A smoked cheese from the Basque region, Idiazabal has a strong, savory
   flavor and a firm texture.
4. Garrotxa: A soft, creamy cheese from Catalonia, Garrotxa has a mild, buttery flavor
   and a delicate aroma.
...
```
The Imagine SDK exposes two clients, each with a different programming paradigm:
synchronous and asynchronous.

{class}`~imagine.ImagineClient` is the synchronous Imagine client. If you don't need
asynchronous programming on your Python code, or simply you are not familiar with
asynchronous programming, this is the client you want to use.

Otherwise, if you are leveraging {obj}`asyncio` on your codebase,
{class}`~imagine.ImagineAsyncClient` might be a better choice.

## Support

````{only} internal

Use the mailing list `imagine.support` for any questions or comments.

````

````{only} external or cirrascale_playground

Please reach out to your Imagine service provider for support.

````

## Table of contents

```{toctree}
---
maxdepth: 2
---

self
install
tutorials/index
api/index
```
