---
title: "Discussion on \"2. ChatBots | Ai Agents\" | Hashnode"
description: "Discussion on \"2. ChatBots | Ai Agents\". How to use Gemini API in JS code\nSimple:\nconst ai = new GoogleGenAI({apiKey:process.env.GEMINI_API_KEY}); // Not remember our prvious chat , cuz it doesnt have context of our current question we will"
url: "https://hashnode.com/posts/2-chatbots-ai-agents/6a6788c3893a55516612cd62"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [2\. ChatBots | Ai Agents](https://gen-ai56.hashnode.dev/2-chatbots-ai-agents?utm_source=hashnode&utm_medium=feed)

How to use Gemini API in JS code Simple: const ai = new GoogleGenAI({apiKey:process.env.GEMINI\_API\_KEY}); // Not remember our prvious chat , cuz it doesnt have context of our current question we will

Jul 27 · 7 min read · gen-ai56.hashnode.dev  
Read the article

## Written by

[Ayush Rajput](https://hashnode.com/@ayuxsh)

@ayuxsh

  
[View profile](https://hashnode.com/@ayuxsh)

</ hello world >

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
