Skip to content

Instantly share code, notes, and snippets.

View cpursley's full-sized avatar

Chase Pursley cpursley

View GitHub Profile
@cpursley
cpursley / postgres_hybrid_search.ex
Last active June 8, 2024 12:43
Postgres Hybrid Search
defmodule PostgresHybridSearch do
@moduledoc """
Postgres Hybrid Search
Loosely based on:
- https://github.com/pgvector/pgvector-python/blob/master/examples/hybrid_search_rrf.py
- https://github.com/Azure-Samples/rag-postgres-openai-python/blob/e30ea96ca11ca6578ca38d3428594bd98d704900/src/fastapi_app/postgres_searcher.py#L2
- https://supabase.com/docs/guides/ai/hybrid-search
- https://github.com/toranb/rag-n-drop/blob/main/lib/demo/section.ex#L30
"""
@cpursley
cpursley / batch_data.json
Last active August 27, 2023 20:25
Batch Data: 6701 W 64th St, Mission, KS 66202
{
"status": {
"code": 200,
"text": "OK"
},
"results": {
"properties": [
{
"_id": "00c72799d8c05b7158357c3bf4d0906b",
"dateModified": "2023-07-07T03:40:17.731Z",
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "QuickBooks Online V3API Collections - OAuth2",
"description": "The QuickBooks Online Accounting API is a RESTful API that is used to access QuickBooks companies.\n\nDocs Ref - https://developer.intuit.com/docs/api/accounting"
},
"host": "DefaultParameterValue",
"basePath": "/v3/company/DefaultParameterValue",
"securityDefinitions": {