Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JayCuthrell/1971b5b24134984289b5a005e627341c to your computer and use it in GitHub Desktop.
Save JayCuthrell/1971b5b24134984289b5a005e627341c to your computer and use it in GitHub Desktop.
"""
Install the Google AI Python SDK
$ pip install google-generativeai
See the getting started guide for more information:
https://ai.google.dev/gemini-api/docs/get-started/python
"""
import os
import google.generativeai as genai
genai.configure(api_key=os.environ["GEMINI_API_KEY"])
# Create the model
# See https://ai.google.dev/api/python/google/generativeai/GenerativeModel
generation_config = {
"temperature": 1,
"top_p": 0.95,
"top_k": 64,
"max_output_tokens": 8192,
"response_mime_type": "text/plain",
}
safety_settings = [
{
"category": "HARM_CATEGORY_HARASSMENT",
"threshold": "BLOCK_MEDIUM_AND_ABOVE",
},
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"threshold": "BLOCK_MEDIUM_AND_ABOVE",
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"threshold": "BLOCK_MEDIUM_AND_ABOVE",
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"threshold": "BLOCK_MEDIUM_AND_ABOVE",
},
]
model = genai.GenerativeModel(
model_name="gemini-1.5-pro-latest",
safety_settings=safety_settings,
generation_config=generation_config,
)
chat_session = model.start_chat(
history=[
{
"role": "user",
"parts": [
"Create a list of startup companies that are in the AI assistant or AI agent space. The list should contain Seed through Series-A startup companies. The list should be in markdown format to include the company name, URL, latest funding round, and a summary of what the company does in under 20 words. The list should be in alphabetical order.",
],
},
{
"role": "model",
"parts": [
"## AI Assistant & AI Agent Startups (Seed - Series A)\n\n| Company Name | URL | Latest Funding Round | Summary |\n|---|---|---|---|\n| **AgentGPT** | [https://agentgpt.co/](https://agentgpt.co/) | Seed | AI agent that can automate tasks, research, and content creation. |\n| **AI21 Labs** | [https://www.ai21labs.com/](https://www.ai21labs.com/) | Series A | Developing AI-powered writing tools for content creation and analysis. |\n| **Anthropic** | [https://www.anthropic.com/](https://www.anthropic.com/) | Series C | Building safe and reliable AI systems with a focus on large language models. |\n| **Character.AI** | [https://www.character.ai/](https://www.character.ai/) | Series A | Allows users to create and interact with AI-powered characters. |\n| **Cohere** | [https://cohere.ai/](https://cohere.ai/) | Series C | Provides a language model API for developers to build AI-powered applications. |\n| **Copy.ai** | [https://www.copy.ai/](https://www.copy.ai/) | Series C | Offers AI-powered tools for content generation, marketing, and copywriting. |\n| **Deepgram** | [https://www.deepgram.com/](https://www.deepgram.com/) | Series D | Provides speech recognition and transcription APIs for real-time and offline use. |\n| **Glean** | [https://glean.com/](https://glean.com/) | Series B | AI-powered search and knowledge discovery platform for enterprise teams. |\n| **Hugging Face** | [https://huggingface.co/](https://huggingface.co/) | Series C | Hosts and develops open-source AI models and datasets. |\n| **Jasper** | [https://www.jasper.ai/](https://www.jasper.ai/) | Series A | Offers AI-powered writing tools for marketing, advertising, and content creation. |\n| **Replika** | [https://replika.ai/](https://replika.ai/) | Seed | AI chatbot that provides personalized companionship and emotional support. |\n| **Scale AI** | [https://scale.ai/](https://scale.ai/) | Series F | Develops AI training data and infrastructure for various applications. |\n| **Stability AI** | [https://stability.ai/](https://stability.ai/) | Series A | Develops AI tools for image generation, text-to-image synthesis, and more. |\n| **You.com** | [https://you.com/](https://you.com/) | Series A | AI-powered search engine that provides more relevant and personalized results. |\n\n**Note:** This list is not exhaustive and the funding rounds are subject to change. \n",
],
},
{
"role": "user",
"parts": [
"Refine this list to be only Seed and Series A companies",
],
},
{
"role": "model",
"parts": [
"## AI Assistant & AI Agent Startups (Seed - Series A)\n\n| Company Name | URL | Latest Funding Round | Summary |\n|---|---|---|---|\n| **AgentGPT** | [https://agentgpt.co/](https://agentgpt.co/) | Seed | AI agent that can automate tasks, research, and content creation. |\n| **Character.AI** | [https://www.character.ai/](https://www.character.ai/) | Series A | Allows users to create and interact with AI-powered characters. |\n| **Jasper** | [https://www.jasper.ai/](https://www.jasper.ai/) | Series A | Offers AI-powered writing tools for marketing, advertising, and content creation. |\n| **Replika** | [https://replika.ai/](https://replika.ai/) | Seed | AI chatbot that provides personalized companionship and emotional support. |\n| **Stability AI** | [https://stability.ai/](https://stability.ai/) | Series A | Develops AI tools for image generation, text-to-image synthesis, and more. |\n| **You.com** | [https://you.com/](https://you.com/) | Series A | AI-powered search engine that provides more relevant and personalized results. |\n\n**Note:** This list is not exhaustive and the funding rounds are subject to change. \n",
],
},
]
)
response = chat_session.send_message("INSERT_INPUT_HERE")
print(response.text)
print(chat_session.history)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment