Skip to content

Instantly share code, notes, and snippets.

View pamelafox's full-sized avatar

Pamela Fox pamelafox

View GitHub Profile
@pamelafox
pamelafox / debug.chatmode.md
Created August 2, 2025 00:20
Debug more for azure-search-openai-demo
description model tools
Debug application to find and fix a bug
Claude Sonnet 4
codebase
usages
vscodeAPI
problems
changes
testFailure
terminalSelection
terminalLastCommand
fetch
findTestFiles
searchResults
githubRepo
extensions
runTests
editFiles
runNotebooks
search
new
runCommands
get_issue
get_issue_comments
pylance mcp server
get-library-docs
Microsoft Docs
playwright

Debug Mode Instructions

You are in debug mode. Your primary objective is to systematically identify, analyze, and resolve bugs in the developer's application. Follow this structured debugging process:

@pamelafox
pamelafox / staleprompt.md
Created July 31, 2025 18:12
Prompt for using GitHub MCP server to find stale issues
mode
agent

Stale Issue Finder and Analyzer

You are a GitHub issue triage specialist tasked with finding old stale issues that can be safely closed as obsolete. DO NOT actually close them yourself unless specifically told to do so. Typically you will ask the user if they want to close, and if they have any changes to your suggested closing replies.

Task Requirements

@pamelafox
pamelafox / asyncio.py
Created May 1, 2025 17:15
AsyncIO example - concurrency in task group
import asyncio
import httpx
async def fetch_url(url):
print(f"Fetching {url}")
async with httpx.AsyncClient(timeout=httpx.Timeout(10.0)) as client:
r = await client.get(url)
print(f"Received {url} with status code {r.status_code}")
return r.text
@pamelafox
pamelafox / experiments.py
Created April 24, 2025 20:36
pymupdf experiments
import logging
import os
import azure.identity
import openai
import pymupdf4llm
from dotenv import load_dotenv
from pydantic import BaseModel
from rich import print
@pamelafox
pamelafox / readme.md
Created April 3, 2025 23:08
Example of Learn YAML for README top
@pamelafox
pamelafox / mcp_server.py
Created March 31, 2025 16:44
MCP Server for azure-search-openai-demo (Basic)
import io
import os
import traceback
from enum import Enum
from azure.identity.aio import (
AzureDeveloperCliCredential,
)
from azure.search.documents.aio import SearchClient
from azure.search.documents.models import (
@pamelafox
pamelafox / ai-environment.bicep
Last active February 24, 2025 21:49
Azure AI Project/Hub (start with main.bicep)
@minLength(1)
@description('Primary location for all resources')
param location string
@description('The AI Hub resource name.')
param hubName string
@description('The AI Project resource name.')
param projectName string
@description('The Storage Account resource ID.')
param storageAccountId string = ''
@pamelafox
pamelafox / azure_token.py
Last active May 14, 2025 11:31
Pydantic AI with Azure or GitHub Models
# pip install azure-identity
# pip install pydantic-ai
from openai import AsyncAzureOpenAI
from azure.identity.aio import (
AzureCliCredential,
get_bearer_token_provider,
)
from pydantic_ai import Agent
@pamelafox
pamelafox / tutor_eval.py
Last active March 5, 2025 16:12
tutor_eval.py
---
name: Tutorness
description: Evaluates how well the responses simulate a tutor
model:
api: chat
parameters:
temperature: 0.0
max_tokens: 800
top_p: 1.0
presence_penalty: 0
@pamelafox
pamelafox / prompty_safety.py
Created February 13, 2025 21:01
Prompty with Content Safety Error Handling
import openai
import prompty
import prompty.azure
# execute the prompt
try:
response = prompty.execute("approaches/prompts/chat_answer_question.prompty",
configuration={
"api_version": "2024-06-01",
"azure_endpoint": "https://cog-xxk4qzq3tahic.openai.azure.com",