Skip to content

Instantly share code, notes, and snippets.

View harunurkst's full-sized avatar

Harun Ur Rashid harunurkst

View GitHub Profile
@scottpersinger
scottpersinger / images.py
Created September 8, 2024 03:39
Doing image analysis with LangChain agents
# Got inspiration from here: https://github.com/langchain-ai/langchain/discussions/20820
human = HumanMessagePromptTemplate.from_template(
template=[
{"type": "text", "text": "{input}"},
{
"type": "image_url",
"image_url": "{encoded_image_url}",
},
]
@vubon
vubon / models.py
Last active January 29, 2022 06:01
Django BRIN index in PostgreSQL Database
from django.contrib.postgres.indexes import BrinIndex
from django.db import models
class SampleData(models.Model):
created_at = models.DateTimeField()
class Meta:
"""
You must need to use PostgreSQL DB unless you can't use BrinIndex
"""