This file contains 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
### Task: | |
Respond to the user query using the provided context, incorporating inline citations in the format [source_id] **only when the <source_id> tag is explicitly provided** in the context. | |
### Guidelines: | |
- If you don't know the answer, clearly state that. | |
- If uncertain, ask the user for clarification. | |
- Respond in the same language as the user's query. | |
- If the context is unreadable or of poor quality, inform the user and provide the best possible answer. | |
- If the answer isn't present in the context but you possess the knowledge, explain this to the user and provide the answer using your own understanding. | |
- **Only include inline citations using [source_id] when a <source_id> tag is explicitly provided in the context.** |
This file contains 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
--- | |
- name: Provision JupyterLab on a VM | |
hosts: all | |
become: yes | |
vars_files: | |
- vars/main.yml | |
pre_tasks: | |
- name: Install system dependencies | |
import_tasks: tasks/system_deps.yml |
This file contains 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 requests | |
import os | |
# https://schema.org/Recipe | |
def create_recipe_from_arguments(name: str, | |
directions: str, | |
ingredients: str, | |
author: str = "", | |
cook_time: str = "10m", |
This file contains 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 requests | |
import datetime | |
import json | |
import os | |
def read_mealplans(start_date: str = None, end_date: str = None): | |
""" | |
Reads the meal plans from Mealie and returns it as a string. | |
Parameters |
This file contains 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 re | |
import requests | |
import os | |
import json | |
import logging | |
#logging.basicConfig(level=logging.DEBUG) | |
def update_recipe_categories(recipe_slug: str, categories_csv: str) -> None: |
This file contains 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 re | |
import requests | |
import os | |
import json | |
def add_recipe_note(recipe_slug: str, note_title: str, note_text:str) -> None: | |
""" | |
Appends a new note to the given recipe in Mealie. | |
This file contains 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 requests | |
import os | |
from urllib.parse import urljoin | |
def get_recipe_in_mealie(slug: str): | |
""" | |
Get a recipe from Mealie using its slug. This returns ingredients and instructions on the recipe. | |
Parameters |
This file contains 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 requests | |
import os | |
from urllib.parse import urljoin | |
def find_recipes_in_mealie( | |
searchTerm: str, | |
categories_csv: str = None, | |
tags_csv: str = None) -> str: | |
""" |
This file contains 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 requests | |
import os | |
def add_recipe_to_mealie_from_url(recipe_url: str, include_tags: bool=False): | |
""" | |
Adds a recipe to Mealie from a URL of a cooking website containing the recipe. | |
Use this function when you have found a recipe using Tavily and have the URL or the user has | |
shared a recipe URL. |
NewerOlder