Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 59 additions & 79 deletions notebooks/chat_pdf_images.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@
"Collecting PyMuPDF\n",
" Downloading pymupdf-1.26.5-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (3.4 kB)\n",
"Downloading pillow-11.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.6 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.6/6.6 MB\u001b[0m \u001b[31m36.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.6/6.6 MB\u001b[0m \u001b[31m36.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
"\u001b[?25hDownloading pymupdf-1.26.5-cp39-abi3-manylinux_2_28_x86_64.whl (24.1 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m24.1/24.1 MB\u001b[0m \u001b[31m23.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m24.1/24.1 MB\u001b[0m \u001b[31m24.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n",
"\u001b[?25hInstalling collected packages: PyMuPDF, Pillow\n",
"Successfully installed Pillow-11.3.0 PyMuPDF-1.26.5\n",
"\n",
Expand Down Expand Up @@ -165,93 +165,73 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"These pages list a variety of plants offered by The Watershed Nursery. Here's a summary of the plant types listed on the individual pages:\n",
"The following plants are listed in the document:\n",
"\n",
"---\n",
"### Annuals\n",
"1. **Centromadia pungens** - Common tarweed\n",
"2. **Epilobium densiflorum** - Dense Spike-primrose\n",
"3. **Eschscholzia caespitosa** - Tufted Poppy\n",
"4. **Eschscholzia californica** - California poppy\n",
"5. **Eschscholzia californica 'Purple Gleam'** - Purple Gleam Poppy\n",
"6. **Eschscholzia californica var. maritima** - Coastal California Poppy\n",
"7. **Madia elegans** - Tarweed\n",
"8. **Mentzelia lindleyi** - Lindley’s Blazing Star\n",
"9. **Symphyotrichum subulatum** - Slim marsh aster\n",
"10. **Trichostema lanceolatum** - Vinegar weed\n",
"\n",
"### **Page 1:**\n",
"### Bulbs\n",
"11. **Brodiaea californica** - California brodiaea\n",
"12. **Chlorogalum pomeridianum** - Soap plant\n",
"13. **Epipactis gigantea** - Stream orchid\n",
"14. **Wyethia angustifolia** - Narrowleaf mule ears\n",
"15. **Wyethia mollis** - Woolly Mule’s Ear’s\n",
"\n",
"**Annuals:**\n",
"- _Centromadia pungens_ (Common tarweed)\n",
"- _Epilobium densiflorum_ (Dense Spike-primrose)\n",
"- _Eschscholzia caespitosa_ (Tufted Poppy)\n",
"- _Eschscholzia californica_ (California Poppy)\n",
"- _Eschscholzia californica 'Purple Gleam'_ (Purple Gleam Poppy)\n",
"- _Eschscholzia californica var. maritima_ (Coastal California Poppy)\n",
"- _Madia elegans_ (Tarweed)\n",
"- _Mentzelia lindleyi_ (Lindley's Blazing Star)\n",
"- _Symphyotrichum subulatum_ (Slim marsh aster)\n",
"- _Trichostema lanceolatum_ (Vinegar weed)\n",
"### Grasses\n",
"16. **Agrostis pallens** - Thingrass\n",
"17. **Anthoxanthum occidentale** - Vanilla grass\n",
"18. **Bouteloua gracilis** - Blue grama\n",
"\n",
"**Bulbs:**\n",
"- _Brodiaea californica_ (California brodiaea)\n",
"- _Chlorogalum pomeridianum_ (Soap plant)\n",
"- _Epipactis gigantea_ (Stream orchid)\n",
"- _Wyethia angustifolia_ (Narrowleaf mule ears)\n",
"- _Wyethia mollis_ (Woolly Mule's Ear)\n",
"\n",
"**Grasses:**\n",
"- _Agrostis pallens_ (Thingrass)\n",
"- _Anthoxanthum occidentale_ (Vanilla grass)\n",
"- _Bouteloua gracilis_ (Blue grama)\n",
"\n",
"---\n",
"\n",
"### **Page 2:**\n",
"\n",
"**Grasses:**\n",
"- _Bromus laevipes_ (Woodland Brome)\n",
"- _Danthonia californica_ (California oatgrass)\n",
"- _Festuca californica_ (California fescue)\n",
"- _Festuca idahoensis_ (Idaho fescue)\n",
"- _Festuca rubra_ (Red fescue)\n",
"- _Sporobolus airoides_ (Alkali sacaton)\n",
"- _Stipa cernua_ (Nodding needlegrass)\n",
"- _Stipa lepida_ (Foothill needlegrass)\n",
"- _Stipa pulchra_ (Purple needlegrass)\n",
"\n",
"**Perennials:**\n",
"- _Achillea millefolium_ (Yarrow)\n",
"- _Ambrosia chamissonis_ (Silvery beachweed)\n",
"- _Anemopsis californica_ (Yerba mansa)\n",
"- _Angelica hendersonii_ (Coast Angelica)\n",
"- _Apocynum cannabinum_ (Hemp Dogbane)\n",
"- _Aquilegia eximia_ (Serpentine columbine)\n",
"- _Aristolochia californica_ (California Dutchman's Pipe)\n",
"\n",
"---\n",
"\n",
"### **Page 3:**\n",
"\n",
"**Perennials:**\n",
"- _Armeria maritima_ (Sea thrift)\n",
"- _Artemisia douglasiana_ (Mugwort)\n",
"- _Asarum caudatum_ (Wild ginger)\n",
"- _Asclepias californica_ (California Milkweed)\n",
"- _Asclepias eriocarpa_ (Woolypod milkweed)\n",
"- _Asclepias fascicularis_ (Narrow leaf milkweed)\n",
"- _Asclepias speciosa_ (Showy milkweed)\n",
"- _Atriplex leucophylla_ (Beach Salt Bush)\n",
"- _Baccharis glutinosa_ (Marsh baccharis)\n",
"- _Bidens laevis_ (Smooth Bur Marigold)\n",
"- _Bolboschoenus maritimus_ (Cosmopolitan bulrush)\n",
"- _Calystegia occidentalis_ (Western chaparral)\n",
"- _Calystegia purpurata ssp. saxicola_ (Bodega Morning Glory)\n",
"- _Camissoniopsis cheiranthifolia_ (Beach primrose)\n",
"- _Campanula rotundifolia_ (Round Leaf Harebell)\n",
"- _Carex athrostachya_ (Slenderbeak sedge)\n",
"- _Carex barbarae_ (Santa Barbara sedge)\n",
"\n",
"---\n",
"\n",
"This listing provides a complete overview of the plants in three categories: Annuals, Bulbs, Grasses, and Perennials across all 3 pages.\n"
"### Perennials\n",
"19. **Achillea millefolium** - Yarrow\n",
"20. **Ambrosia chamissonis** - Silvery beachweed\n",
"21. **Anemopsis californica** - Yerba mansa\n",
"22. **Angelica hendersonii** - Coast Angelica\n",
"23. **Apocynum cannabinum** - Hemp Dogbane\n",
"24. **Aquilegia eximia** - Serpentine columbine\n",
"25. **Aristolochia californica** - California Dutchman’s\n",
"26. **Armeria maritima** - Sea thrift\n",
"27. **Artemisia douglasiana** - Mugwort\n",
"28. **Asarum caudatum** - Wild ginger\n",
"29. **Asclepias californica** - California Milkweed\n",
"30. **Asclepias eriocarpa** - Woolypod milkweed\n",
"31. **Asclepias fascicularis** - Narrow leaf milkweed\n",
"32. **Asclepias speciosa** - Showy milkweed\n",
"33. **Atriplex leucophylla** - Beach Salt Bush\n",
"34. **Baccharis glutinosa** - Marsh baccharis\n",
"35. **Bidens laevis** - Smooth Bur Marigold\n",
"36. **Bolboschoenus maritimus** - Cosmopolitan bulrush\n",
"37. **Calystegia occidentalis** - Western chaparral\n",
"38. **Calystegia purpurata ssp. saxicola** - Bodega Morning Glory\n",
"39. **Camissoniopsis cheiranthifolia** - Beach primrose\n",
"40. **Campanula rotundifolia** - Round Leaf Harebell\n",
"41. **Carex athrostachya** - Slenderbeak sedge\n",
"42. **Carex barbarae** - Santa Barbara sedge\n",
"43. **Bromus laevipes** - Woodland Brome\n",
"44. **Danthonia californica** - California oatgrass\n",
"45. **Festuca californica** - California fescue\n",
"46. **Festuca idahoensis** - Idaho fescue\n",
"47. **Festuca rubra** - Red fescue\n",
"48. **Sporobolus airoides** - Alkali sacaton\n",
"49. **Stipa cernua** - Nodding needlegrass\n",
"50. **Stipa lepida** - Foothill needlegrass\n",
"51. **Stipa pulchra** - Purple needlegrass\n"
]
}
],
Expand Down
53 changes: 26 additions & 27 deletions notebooks/chat_vision.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using GitHub Models with GITHUB_TOKEN as key\n",
"Using model gpt-4o\n"
"Using model openai/gpt-4o\n"
]
}
],
Expand Down Expand Up @@ -131,7 +131,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -198,30 +198,29 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"This menu doesn't seem to have any explicitly vegan dishes, as many options contain meat, seafood, cheese, or other animal-derived ingredients. However, some dishes could potentially be modified to make them vegan-friendly. Here are some dishes that seem like they may be adapted:\n",
"There are limited options for vegans on this menu, as many dishes include animal-based ingredients like cheese, cream, meat, and seafood. However, a few dishes could potentially be adapted to suit a vegan diet. Here's a breakdown:\n",
"\n",
"### Possible Vegan/Adaptable Options:\n",
"1. **Spinaci Soffritti** (Antipasti) - Fresh spinach sautéed with lemon and garlic. This dish appears to be naturally vegan.\n",
" \n",
"2. **Insalata Di Maria** (Zuppe & Insalate) - Seasonal greens, farro salad, cherry tomatoes, and avocado, tossed with Carmine’s House Vinaigrette. Double-check the vinaigrette to ensure it doesn't contain honey or other non-vegan ingredients.\n",
"\n",
"### Antipasti:\n",
"- **Spinaci Soffritti (8)**: Fresh spinach sautéed with lemon and garlic. Ensure no butter or animal-based oils are used for preparation.\n",
"- **Bruschetta Trio (18)**: The avocado, smoked salmon, and crème fraiche bruschetta sounds flexible. Ask if it can be served without the salmon and crème fraiche, and confirm the base bread is vegan.\n",
"3. **Panzenella con Fagioli** (Zuppe & Insalate) - Vine tomatoes, bread salad, onions, cannellini beans, cucumbers, and avocado, tossed with Carmine’s House Vinaigrette. Check whether the bread is made without dairy or eggs.\n",
"\n",
"### Zuppe & Insalate:\n",
"- **Panzanella con Fagioli (18)**: A vine tomato and bread salad mixed with onions, beans, cucumbers, and avocado. Ask the kitchen to confirm that Carmine's House Vinaigrette is vegan.\n",
"- **Insalata Di Mista (13)**: Seasonal greens tossed in the house vinaigrette. Double-check if the dressing is vegan and skip the option of adding chicken or steak. \n",
"- **Zuppa Di Fagioli (11)**: Tuscan beans and pasta soup. Ensure it is made with vegetable stock (not meat-based). \n",
"- **Portofino Salad (18)**: Tomatoes, nicoise olives, and vegetables. You’ll need to request no egg, anchovies, or tuna.\n",
"4. **Spaghetti Ortolano** (Pasta & Risotto) - Arugula, tomatoes, pine nuts, and extra virgin olive oil. Omit the goat cheese to make it vegan.\n",
"\n",
"### Pasta:\n",
"While none of the listed pasta dishes are vegan, you could inquire with the chef if there is a plain pasta primavera or vegetable pasta option available, made with olive oil and without cheese, cream, or other animal ingredients.\n",
"### Suggestions:\n",
"- Ask the staff if substitutions or customizations are possible, such as removing cheese or using vegan dressings/sauces.\n",
"- Confirm any hidden animal-based additions in dishes like vinaigrettes, breads, or roasted vegetables.\n",
"\n",
"### Final Suggestions:\n",
"Talk with your server to determine if they have vegan customization options or any off-menu items catering to dietary preferences.\n"
"Vegans may find some options with modification, but this menu primarily caters to non-vegan diets.\n"
]
}
],
Expand Down Expand Up @@ -258,7 +257,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Diagram showing the architecture of an Azure-based deployment for a containerized chat application. The central component is a \"Container App\" connected to various Azure resources. It links to a \"Container Apps Environment\" at the top, Azure Cognitive Services (\"Azure AI Services\") on the top right, and \"Managed Identity\" on the bottom left. Other connected resources include \"Log Analytics Workspace\" for monitoring, a \"Container Registry\" for image storage, and an Azure \"Key Vault\" for secret management. The flow of dependencies is visually represented with arrows between the components, illustrating their interactions.\n"
"Diagram showing the architecture of a containerized chat application in Azure. Central to the design is a container app, labeled \"chat-app-cnbr6e7fwgzj2-ca,\" deployed within a \"Container Apps Environment.\" The app connects to Azure services, including \"Azure AI services (cnbr6e7fwgzj2-cog)\" and a \"Managed Identity (chat-app-cnbr6e7fwgzj2-id-aca).\" Supporting components include a \"Log Analytics workspace (chat-app-cnbr6e7fwgzj2-log),\" a \"Container registry (chatappcnbr6e7fwgzj2registry),\" and a \"Key vault (chatappcnbr6e7f-vault).\" Interactions are indicated by arrows connecting the components, representing integration and workflow.\n"
]
}
],
Expand Down Expand Up @@ -295,16 +294,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The damage shown in this image is not consistent with hail damage. Hail damage is typically characterized by multiple small, round dents across the surface of the vehicle, usually on the hood, roof, and trunk, as well as occasionally cracked or broken windows.\n",
"This damage does not appear to be caused by hail. Hail damage typically consists of numerous small dents or dings spread across the surface of the vehicle, such as the hood, roof, and trunk, and not extensive impact damage that transforms or crushes the structure as shown in this image. \n",
"\n",
"The significant and centralized deformation of the hood, along with substantial damage to the front grille and surrounding areas, suggests impact with a large object (e.g., another vehicle, a tree, or a pole), not hailstones. Based on this observation, the claim is not valid if it is attributed solely to hail.\n"
"The claim stating this damage is hail-related is likely invalid, as it more closely resembles damage caused by a collision or impact with another object, such as another vehicle or a stationary barrier.\n"
]
}
],
Expand Down Expand Up @@ -342,14 +341,14 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The zone where we are losing the most trees is the **Tropical zone**, represented by the dark green bars in the graph. It consistently shows the largest amount of tree cover loss compared to the Boreal, Temperate, and Subtropical zones.\n"
"The zone where we are losing the most trees is the **Tropical zone**, represented by the dark green bars. It consistently shows the largest annual loss in tree cover compared to the other zones (Boreal, Temperate, and Subtropical).\n"
]
}
],
Expand All @@ -368,7 +367,7 @@
" ],\n",
" }\n",
"]\n",
"response = openai_client.chat.completions.create(model=os.environ[\"OPENAI_MODEL\"], messages=messages, temperature=0.5)\n",
"response = openai_client.chat.completions.create(model=model_name, messages=messages, temperature=0.5)\n",
"\n",
"print(response.choices[0].message.content)"
]
Expand All @@ -382,14 +381,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The cheapest plant listed on the availability sheet is *Agrostis pallens* (Thringrass) under the \"Grass\" category, priced at **$0.58** per stub.\n"
"The cheapest plant available is **Thringrass (Agrostis pallens)**, priced at **$0.58** per stub.\n"
]
}
],
Expand Down Expand Up @@ -471,7 +470,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
"version": "3.11.13"
}
},
"nbformat": 4,
Expand Down