# Connecting to LLMs

#### Best Models for PapertLab

PapertLab is optimized to work with several advanced language models that are particularly effective at code editing. These models bring a range of capabilities that enhance the development process:

* **GPT-4o**: Known for its robust understanding of complex code structures, GPT-4o offers advanced editing capabilities that make it a top choice for developers using PapertLab.
* **Claude 3.5 Sonnet**: This model excels in understanding and generating code, providing powerful assistance for intricate coding tasks, making it highly compatible with PapertLab’s features.
* **Claude 3 Opus**: With its deep learning architecture, Claude 3 Opus offers superior code comprehension and editing, making it an ideal partner for PapertLab in handling large and complex projects.

#### Utilizing Free Models with PapertLab

PapertLab also supports several free API providers, allowing users to leverage powerful models without additional costs:

* **Google’s Gemini 1.5 Pro**: This model integrates well with PapertLab, offering capabilities similar to GPT-3.5 in code editing. It’s an excellent choice for developers looking for a cost-effective solution with robust performance.
* **Llama 3 70B on Groq**: For those seeking a free yet powerful alternative, Llama 3 70B provides a level of code editing performance comparable to GPT-3.5, and works seamlessly with PapertLab.
* **Cohere’s Command-R+**: While more basic, Cohere’s Command-R+ model provides a free option for coding assistance. It’s compatible with PapertLab, making it a viable choice for simpler coding tasks or as a starting point for developers.

#### Local Models with PapertLab

PapertLab is also designed to work with local models, offering flexibility for developers who prefer or require local processing:

* **Ollama Integration**: PapertLab supports the use of local models through platforms like Ollama. This allows developers to run code editing tasks locally, providing greater control over their environment and potentially enhancing performance and security.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.papert.in/connecting-to-llms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
