✨ 7 AI Libraries EVERY Dev Needs to Know (to be a wiz)🧙‍♂️ 🪄
uliyahoo

uliyahoo @uliyahoo

About: Co-founder & DevRel @tawkit.ai - Making it easy to integrate LLMs into Applications.

Location:
Seattle, Washington
Joined:
Oct 30, 2023

✨ 7 AI Libraries EVERY Dev Needs to Know (to be a wiz)🧙‍♂️ 🪄

Publish Date: Dec 4 '23
292 26

TL;DR

These days, any dev can build powerful things with AI.

No need to be a ML expert.

Here are the 7 best libraries you can use to supercharge your development and to impress users with state-of-the-art AI features.

These can give your project magical powers, so DON'T FORGET TO STAR & SUPPORT THEM 🌟

Image description


1. CopilotTextarea - AI-powered Writing in React Apps

Image description

A drop-in replacement for any react <textarea> with the features of Github CopilotX.

Autocompletes, insertions, edits.

Can be fed any context in real time or by the developer ahead of time.



import { CopilotTextarea } from "@copilotkit/react-textarea";
import { CopilotProvider } from "@copilotkit/react-core";


// Provide context...
useMakeCopilotReadable(...)

// in your component...
<CopilotProvider>
    <CopilotTextarea/>
</CopilotProvider>`
```

Star CopilotTextarea ⭐️


---


## 2. Tavily GPT Researcher - Get an LLM to Search the Web & Databases



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/61mwfvsi4n9rnjet0j52.png)

Tavily enables you to add GPT-powered research and content generation tools to your React applications, enhancing their data processing and content creation capabilities.



```tsx 
# Create an assistant
assistant = client.beta.assistants.create(
    instructions=assistant_prompt_instruction,
    model="gpt-4-1106-preview",
    tools=[{
        "type": "function",
        "function": {
            "name": "tavily_search",
            "description": "Get information on recent events from the web.",
            "parameters": {
                "type": "object",
                "properties": {
                    "query": {"type": "string", "description": "The search query to use. For example: 'Latest news on Nvidia stock performance'"},
                },
                "required": ["query"]
            }
        }
    }]
)
```
Star Tavily ⭐️


---


## 3. Pezzo.ai - Observability, Cost & Prompt Engineering Platform



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nxvbgi5zkghkb0t64npw.jpeg)

Centralized platform for managing your OpenAI calls. 

Optimize your prompts & token use. Keep track of your AI use.

Free & easy to integrate. 

```tsx 
const prompt = await pezzo.getPrompt("AnalyzeSentiment");
const response = await openai.chat.completions.create(prompt);
```
Star Pezzo ⭐️


---
## 4. [CopilotPortal](https://github.com/RecursivelyAI/CopilotKit): Embed an actionable LLM chatbot inside your app. 



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szzmw5l8c9m4bce23bd3.png)


A context-aware LLM chatbot inside your application that answers questions and takes actions.

Get a working chatBot with a few lines of code, then customize and embed as deeply as you need to.


```tsx
import "@copilotkit/react-ui/styles.css";
import { CopilotProvider } from "@copilotkit/react-core";
import { CopilotSidebarUIProvider } from "@copilotkit/react-ui";

export default function App(): JSX.Element {
  return (
  <CopilotProvider chatApiEndpoint="/api/copilotkit/chat">
      <CopilotSidebarUIProvider>

        <YourContent />

      </CopilotSidebarUIProvider>
    </CopilotProvider>
  );
}
```

Star CopilotPortal ⭐️


---

## 5. LangChain - Pull together AIs into action chains. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8s87kvm5jt5wmsv702r1.png)

Easy-to-use API and library for adding LLMs into apps.

Link together different AI components and models. 

Easily embed context and semantic data for powerful integrations.

```tsx
from langchain.llms import OpenAI
from langchain import PromptTemplate
llm = OpenAI(model_name="text-davinci-003", openai_api_key="YourAPIKey")  # Notice "food" below, that is a placeholder for another value later
template = """ I really want to eat {food}. How much should I eat? Respond in one short sentence """

prompt = PromptTemplate(
    input_variables=["food"],
    template=template,
)

final_prompt = prompt.format(food="Chicken")

print(f"Final Prompt: {final_prompt}")

print("-----------")

print(f"LLM Output: {llm(final_prompt)}")

```

Star LangChain ⭐️



---

## 6. [Weaviate](https://github.com/weaviate/weaviate) - Vector Database for AI-Enhanced Projects


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/brp7plpkk9sy44ubc14t.png)

Weaviate is a vector database optimized for fast, efficient searches across large datasets. 

It supports integration with AI models and services from providers like OpenAI and Hugging Face, enabling advanced tasks such as data classification and natural language processing. 

It's a cloud-native solution and highly scalable to meet evolving data demands.


```tsx 
import weaviate
import json

client = weaviate.Client(
    embedded_options=weaviate.embedded.EmbeddedOptions(),
)

uuid = client.data_object.create({

})

obj = client.data_object.get_by_id(uuid, class_name='MyClass')

print(json.dumps(obj, indent=2))
```

Star Weaviate ⭐️


---

## 7. [PrivateGPT](https://github.com/imartinez/privateGPT) - Chat with your Docs, 100% privately 💡


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ap81ce5j9chc5c543jl6.jpg)

PrivateGPT allows for secure, GPT-driven document interaction within your applications, ensuring data privacy and enhancing context-aware processing capabilities.

PrivateGPT ensures privacy by locally processing and storing documents and context, without sending data to external servers.


```tsx 
from privategpt import PrivateGPT, DocumentIngestion, ChatCompletion

client = PrivateGPT(api_key='your_api_key')

def process_documents_and_chat(query, documents):
    ingestion_result = DocumentIngestion(client, documents)
    chat_result = ChatCompletion(client, query, context=ingestion_result.context)
    return chat_result

documents = ['doc1.txt', 'doc2.txt']
query = "What is the summary of the documents?"
result = process_documents_and_chat(query, documents)
print(result)

```

Star PrivateGPT ⭐️


---

## [Bonus Library]. SwirlSearch - AI powered search. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/extnr9oxhubs6m9x817a.png)

LLM-powered search, summaries and output. 

Searches multiple content sources simultaneously into integrated output. 

Powerful for tailored in-app integrations of various data sources.


Star SwirlSearch ⭐️



---

Thanks for reading!

I hope these help you build some awesome stuff with AI. 

Please like if you enjoyed & comment any other libraries or topics you would like to see.
Enter fullscreen mode Exit fullscreen mode

Comments 26 total

  • uliyahoo
    uliyahooDec 4, 2023

    Hey people 👋

    Hope you enjoyed the article! Don't forget to give it some reaction for support.

    Let me know if there are any libraries you wish I included & what you'd like to see written about next!

    Cheers 🍾🫡

    • Best Codes
      Best CodesDec 14, 2023

      Hmm… I think this is a case of a good listicle! I gave it a like and bookmark!

  • Steven
    StevenDec 4, 2023

    Great list!
    Thank you for sharing!

    • uliyahoo
      uliyahooDec 4, 2023

      Thanks for checking it out 😬

  • David
    DavidDec 4, 2023

    CopilotKit looks pretty nice!

    • uliyahoo
      uliyahooDec 4, 2023

      She is very nice 😍

  • Nevo David
    Nevo DavidDec 4, 2023

    CopilotKit is interesting!
    What can I do with it?

    • uliyahoo
      uliyahooDec 4, 2023

      Thanks for the question,

      It's a library for integrating AI into react apps.

      You can:

      1. Easily insert a GPT chatBot that takes actions & answers questions

      2. Turn any into an AI-powered

      Lmk if you have any more Q's about it 👩‍🌾

      github.com/RecursivelyAI/CopilotKit

  • Marine
    MarineDec 4, 2023

    Great compilation, thanks for sharing!

    • uliyahoo
      uliyahooDec 4, 2023

      Thanks for checking it out :)

  • Bap
    BapDec 4, 2023

    Nice repos! Thanks for sharing :D

  • Atai Barkai
    Atai BarkaiDec 4, 2023

    I think a lot of these can work together well 👀
    Very cool list!

    • uliyahoo
      uliyahooDec 4, 2023

      Yup! Understated point.

      The kinds of projects that even junior devs can build by mixing these libraries is hard to grasp.

  • 𝚂𝚊𝚞𝚛𝚊𝚋𝚑 𝚁𝚊𝚒
    𝚂𝚊𝚞𝚛𝚊𝚋𝚑 𝚁𝚊𝚒Dec 4, 2023

    That is an excellent list. I love all the projects. 💖
    Awesome Open Source 🔥

    • uliyahoo
      uliyahooDec 4, 2023

      Yes! These projects are all incredible and Open Source is the way!

  • Nathan Tarbert
    Nathan TarbertDec 4, 2023

    Nice to see Swirl in the list :)

    • uliyahoo
      uliyahooDec 4, 2023

      It's a great project 😬

  • Ranjan Dailata
    Ranjan DailataDec 5, 2023

    Pezzo.ai is really great. I simply love it.

    • uliyahoo
      uliyahooDec 5, 2023

      Yup. My favorite observability library

  • Matija Sosic
    Matija SosicDec 5, 2023

    nice list!

  • Jeffrey Ip
    Jeffrey IpDec 5, 2023

    Don't forget github.com/confident-ai/deepeval! For serious hardcore AI engineers only :)

  • Stefan Neidig
    Stefan NeidigDec 7, 2023

    Cool list. Thanks for sharing. Personally, I prefer Quivr over PrivateGPT. Otherwise great list.

Add comment