Skip to content

Instantly share code, notes, and snippets.

View rominirani's full-sized avatar

Romin Irani rominirani

  • Mumbai
View GitHub Profile
from autogen import ConversableAgent
import autogen
# Configure Gemini models
config_list_gemini = autogen.config_list_from_json("model_config.json")
SYSTEM_MESSAGE_INITIAL_CFP_WRITER = """
Your task is to write a good, clean, and impactful proposal or submission for a CFP to a technical event.
Generate only the following as part of the CFP:
- Title
CFP Writer (to CFP Reviewer):
Following is a rough idea for which I would like a talk proposal that I can submit:
## Title: Multi-Agent Systems with Agentic Framework and Gemini Models
## Abstract:
This talk explores the power of multi-agent systems powered by the Agentic framework and Gemini models. We will delve into the architecture and functionalities of the Agentic framework, showcasing its ability to orchestrate and manage complex interactions between multiple agents. We will then demonstrate how Gemini models, with their advanced language and reasoning capabilities, can be effectively integrated into these agents, enabling them to perform sophisticated tasks and achieve desired outcomes. The talk will highlight practical applications and real-world scenarios where this powerful combination can be leveraged for innovative solutions.
## Key Takeaways:
from autogen import ConversableAgent
import autogen
# Configure Gemini models
config_list_gemini = autogen.config_list_from_json("model_config.json")
SYSTEM_MESSAGE_INITIAL_CFP_WRITER = """
Your task is to write a good, clean, and impactful proposal or submission for a CFP to a technical event.
Generate only the following as part of the CFP:
- Title
package com.geminidemo;
import com.google.cloud.vertexai.VertexAI;
import com.google.cloud.vertexai.api.Content;
import com.google.cloud.vertexai.api.FunctionCall;
import com.google.cloud.vertexai.api.FunctionDeclaration;
import com.google.cloud.vertexai.api.GenerateContentResponse;
import com.google.cloud.vertexai.api.GenerationConfig;
import com.google.cloud.vertexai.api.HarmCategory;
import com.google.cloud.vertexai.api.SafetySetting;
@rominirani
rominirani / TextPredict.java
Created November 20, 2023 08:10
Text Prediction in Java using langchain4j and Vertex AI PaLM2 Text model
package gcfv2;
import java.io.BufferedWriter;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.stream.Collectors;
@rominirani
rominirani / pom.xml
Created November 20, 2023 08:03
pom.xml for langchain4j and Text Bison PaLM model App
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>gcfv2</groupId>
<artifactId>http</artifactId>
<version>0.0.1</version>
<name>HTTP Function for Cloud Functions 2nd gen</name>
<properties>
<maven.compiler.target>11</maven.compiler.target>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>gcfv2</groupId>
<artifactId>http</artifactId>
<version>0.0.1</version>
<name>HTTP Function for Cloud Functions 2nd gen</name>
<properties>
<maven.compiler.target>11</maven.compiler.target>
package gcfv2;
import java.io.BufferedWriter;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.stream.Collectors;
@rominirani
rominirani / main.py
Last active September 18, 2023 05:43
import datetime
import os
from google.cloud import logging
from typing import Mapping
import google.auth.transport.requests
import google.oauth2.id_token
import requests
import flask
gcloud functions deploy summarizeText \
--gen2 \
--runtime=python311 \
--region=$GCP_REGION \
--source=. \
--entry-point=summarizeText \
--trigger-http \
--set-env-vars=GCP_PROJECT=$GCP_PROJECT,GCP_REGION=$GCP_REGION \
--allow-unauthenticated