This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"github.copilot.chat.codeGeneration.instructions": [ | |
{ | |
"text": "Always add a comment: 'Generated by Copilot'." | |
}, | |
{ | |
"text": "In Python always adhere to PEP8. Prefer pandas over polars. Prefer argparse over click." | |
}, | |
{ | |
"text": "Use type annotations when writing python function signatures and classes." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import requests | |
from datetime import datetime | |
import urllib.parse | |
from bs4 import BeautifulSoup | |
from rich import print | |
import openai | |
from pydantic import BaseModel | |
from azure.identity import AzureDeveloperCliCredential, get_bearer_token_provider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import bs4 | |
import requests | |
import rich | |
from openai import OpenAI | |
from pydantic import BaseModel | |
client = OpenAI( | |
base_url="https://models.inference.ai.azure.com", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# print python version | |
import sys | |
print(sys.version) | |
import math | |
if True: | |
wow = f"""this is a multiline f string with triple quotes {math.pi:0.2f} : | |
1. Line 1 | |
2. Line 3 {math.pi:0.2f}""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
from dotenv import load_dotenv | |
from openai import AzureOpenAI | |
import requests | |
load_dotenv(".env", override=True) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Hybrid search with real time translation. Combining pgvector, postgis, azure_local_ai, azure_ai, Azure Language Services | |
WITH listings_cte AS ( | |
SELECT l.listing_id, name, listing_location, summary FROM listings l | |
INNER JOIN calendar c ON l.listing_id = c.listing_id | |
WHERE ST_DWithin( | |
listing_location::geography, | |
ST_GeographyFromText('POINT(-122.349358 47.620422)') | |
,3218 ) | |
AND c.date = '2016-01-13' | |
AND c.available = 't' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import psycopg2 | |
import openai | |
import azure.identity | |
import numpy as np | |
from dotenv import load_dotenv | |
from pgvector.psycopg2 import register_vector | |
load_dotenv() |
This is a comparison of calls made to either OpenAI gpt-35-turbo or Ollama Llama3.1 with a function calling request. The geneal goal of the function is to take a user query and turn it into a search query, along with optional price filter or brand filter. See the file below this one for the tools definition.
gpt-35: 😊
{"search_query":"Best shoe for hiking"}
llama3.1: 😊
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param location string | |
param aiHubName string | |
param aiProjectName string | |
param modelName string | |
param modelVersion string | |
param deploymentName string | |
param tags object = {} | |
param publicNetworkAccess string | |
param aiServicesName string |