Spaces:
Build error
Build error
working app_dev. hopefully working app
Browse filesFiles changed (12)
- .gitattributes+2
- .gitignoreAdded+8
- Changelog.mdAdded+34
- app.py+54-28
- app_dev.pyAdded+280
- gemini_model.pyAdded+177
- magic.lockAdded+1312
- my_agent.pyAdded+45
- pyproject.tomlAdded+19
- requirements.txt+3-1
- src/final_assignment_template/__init__.pyAdded
- tools.pyAdded+4
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines333435363732 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text# SCM syntax highlighting & preventing 3-way mergespixi.lock merge=binary linguist-language=YAML linguist-generated=true
12345678
# pixi environments.pixi*.egg-info# magic environments.magic__pycache__/*.pyc12345678910111213141516171819202122232425262728293031323334## [Unreleased]
### Added- Moved agent instantiation into a separate `instantiate_agent` function in `app_dev.py`.- Extracted question fetching logic into a new `fetch_questions` function in `app_dev.py`.- Created `my_agent.py` for custom agent implementation.- Added `GeminiApiModel` for interacting with Google Gemini API.- Refactored `SmolAgent` in `my_agent.py` to use `GeminiApiModel`.- Removed standalone `call_gemini_api` function from `my_agent.py`.
### Changed- Simplified error handling in `run_and_submit_all` by removing redundant try-except block around `instantiate_agent` call.- Updated `run_and_submit_all` to call `fetch_questions` and handle its return values.- Updated `app_dev.py` to import and use `SmolAgent` from `my_agent.py`.
### Deprecated
### Removed
### Fixed
### Security
## [0.1.0] - 2024-07-25
### Added- Initial project structure based on template.- Basic Gradio app (`app.py`) for agent evaluation.- Development version of app (`app_dev.py`) for local testing.- Placeholder `BasicAgent` in `app_dev.py`.- `README.md` with project overview and setup instructions.- `Changelog.md` to track changes.- `.gitignore` file.- Placeholder `requirements.txt`. 1 unmodified line23456789101112131415161718192021222324252627282930313233345 unmodified lines404142434445468 unmodified lines5556575859606162636465666768697010 unmodified lines81828384858687888990919293949596979863 unmodified lines1621631641651661671681691701711721731741751761771781791801811 unmodified line1831841851861871881891901911921931941951961 unmodified lineimport gradio as grimport requestsimport inspectimport pandas as pd# (Keep Constants as is)# --- Constants ---DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"# --- Basic Agent Definition ---# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------class BasicAgent:def __init__(self):print("BasicAgent initialized.")def __call__(self, question: str) -> str:print(f"Agent received question (first 50 chars): {question[:50]}...")fixed_answer = "This is a default answer."print(f"Agent returning fixed answer: {fixed_answer}")return fixed_answerdef run_and_submit_all( profile: gr.OAuthProfile | None):"""Fetches all questions, runs the BasicAgent on them, submits all answers,and displays the results."""# --- Determine HF Space Runtime URL and Repo URL ---space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the codeif profile:username= f"{profile.username}"print(f"User logged in: {username}")else:print("User not logged in.")5 unmodified lines# 1. Instantiate Agent ( modify this part to create your agent)try:agent = BasicAgent()except Exception as e:print(f"Error instantiating agent: {e}")return f"Error initializing agent: {e}", None8 unmodified linesresponse.raise_for_status()questions_data = response.json()if not questions_data:print("Fetched questions list is empty.")return "Fetched questions list is empty or invalid format.", Noneprint(f"Fetched {len(questions_data)} questions.")except requests.exceptions.RequestException as e:print(f"Error fetching questions: {e}")return f"Error fetching questions: {e}", Noneexcept requests.exceptions.JSONDecodeError as e:print(f"Error decoding JSON response from questions endpoint: {e}")print(f"Response text: {response.text[:500]}")return f"Error decoding server response for questions: {e}", Noneexcept Exception as e:print(f"An unexpected error occurred fetching questions: {e}")return f"An unexpected error occurred fetching questions: {e}", None10 unmodified linescontinuetry:submitted_answer = agent(question_text)answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})except Exception as e:print(f"Error running agent on task {task_id}: {e}")results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})if not answers_payload:print("Agent did not produce any answers to submit.")return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)# 4. Prepare Submissionsubmission_data = {"username": username.strip(), "agent_code": agent_code, "answers": answers_payload}status_update = f"Agent finished. Submitting {len(answers_payload)} answers for user '{username}'..."print(status_update)63 unmodified linesrun_button = gr.Button("Run Evaluation & Submit All Answers")status_output = gr.Textbox(label="Run Status / Submission Result", lines=5, interactive=False)# Removed max_rows=10 from DataFrame constructorresults_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)run_button.click(fn=run_and_submit_all,outputs=[status_output, results_table])if __name__ == "__main__":print("\n" + "-"*30 + " App Starting " + "-"*30)# Check for SPACE_HOST and SPACE_ID at startup for informationspace_host_startup = os.getenv("SPACE_HOST")space_id_startup = os.getenv("SPACE_ID") # Get SPACE_ID at startupif space_host_startup:print(f"✅ SPACE_HOST found: {space_host_startup}")1 unmodified lineelse:print("ℹ️ SPACE_HOST environment variable not found (running locally?).")if space_id_startup: # Print repo URLs if SPACE_ID is foundprint(f"✅ SPACE_ID found: {space_id_startup}")print(f" Repo URL: https://huggingface.co/spaces/{space_id_startup}")print(f" Repo Tree URL: https://huggingface.co/spaces/{space_id_startup}/tree/main")else:print("ℹ️ SPACE_ID environment variable not found (running locally?). Repo URL cannot be determined.")print("-"*(60 + len(" App Starting ")) + "\n")print("Launching Gradio Interface for Basic Agent Evaluation...")demo.launch(debug=True, share=False)1 unmodified line234567891011121314151617181920212223242526272829303132333435363738395 unmodified lines454647484950518 unmodified lines6061626364656667686970717273747510 unmodified lines868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012163 unmodified lines1851861871881891901911921931941951961971981992002012022031 unmodified line2052062072082092102112122132142152162172182192202212221 unmodified lineimport gradio as grimport requestsimport inspectimport pandas as pfrom my_agent import SmolAgent # Import the new agentd# (Keep Constants as is)# --- Constants ---DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"# --- Basic Agent Definition ---# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------class BasicAgent:def __init__(self):print("BasicAgent initialized.")def __call__(self, question: str) -> str:print(f"Agent received question (first 50 chars): {question[:50]}...")fixed_answer = "This is a default answer."print(f"Agent returning fixed answer: {fixed_answer}")return fixed_answerdef run_and_submit_all(profile: gr.OAuthProfile | None):"""Fetches all questions, runs the BasicAgent on them, submits all answers,and displays the results."""# --- Determine HF Space Runtime URL and Repo URL ---space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the codeif profile:username = f"{profile.username}"print(f"User logged in: {username}")else:print("User not logged in.")5 unmodified lines# 1. Instantiate Agent ( modify this part to create your agent)try:agent = SmolAgent()except Exception as e:print(f"Error instantiating agent: {e}")return f"Error initializing agent: {e}", None8 unmodified linesresponse.raise_for_status()questions_data = response.json()if not questions_data:print("Fetched questions list is empty.")return "Fetched questions list is empty or invalid format.", Noneprint(f"Fetched {len(questions_data)} questions.")except requests.exceptions.RequestException as e:print(f"Error fetching questions: {e}")return f"Error fetching questions: {e}", Noneexcept requests.exceptions.JSONDecodeError as e:print(f"Error decoding JSON response from questions endpoint: {e}")print(f"Response text: {response.text[:500]}")return f"Error decoding server response for questions: {e}", Noneexcept Exception as e:print(f"An unexpected error occurred fetching questions: {e}")return f"An unexpected error occurred fetching questions: {e}", None10 unmodified linescontinuetry:submitted_answer = agent(question_text)answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})results_log.append({"Task ID": task_id,"Question": question_text,"Submitted Answer": submitted_answer,})except Exception as e:print(f"Error running agent on task {task_id}: {e}")results_log.append({"Task ID": task_id,"Question": question_text,"Submitted Answer": f"AGENT ERROR: {e}",})if not answers_payload:print("Agent did not produce any answers to submit.")return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)# 4. Prepare Submissionsubmission_data = {"username": username.strip(),"agent_code": agent_code,"answers": answers_payload,}status_update = f"Agent finished. Submitting {len(answers_payload)} answers for user '{username}'..."print(status_update)63 unmodified linesrun_button = gr.Button("Run Evaluation & Submit All Answers")status_output = gr.Textbox(label="Run Status / Submission Result", lines=5, interactive=False)# Removed max_rows=10 from DataFrame constructorresults_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)run_button.click(fn=run_and_submit_all, outputs=[status_output, results_table])if __name__ == "__main__":print("\n" + "-" * 30 + " App Starting " + "-" * 30)# Check for SPACE_HOST and SPACE_ID at startup for informationspace_host_startup = os.getenv("SPACE_HOST")space_id_startup = os.getenv("SPACE_ID") # Get SPACE_ID at startupif space_host_startup:print(f"✅ SPACE_HOST found: {space_host_startup}")1 unmodified lineelse:print("ℹ️ SPACE_HOST environment variable not found (running locally?).")if space_id_startup: # Print repo URLs if SPACE_ID is foundprint(f"✅ SPACE_ID found: {space_id_startup}")print(f" Repo URL: https://huggingface.co/spaces/{space_id_startup}")print(f" Repo Tree URL: https://huggingface.co/spaces/{space_id_startup}/tree/main")else:print("ℹ️ SPACE_ID environment variable not found (running locally?). Repo URL cannot be determined.")print("-" * (60 + len(" App Starting ")) + "\n")print("Launching Gradio Interface for Basic Agent Evaluation...")demo.launch(debug=True, share=False)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280import osimport gradio as grimport requestsimport inspectimport pandas as pd
from my_agent import SmolAgent # Import the new agent
# (Keep Constants as is)# --- Constants ---DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
# --- Basic Agent Definition ---# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------class BasicAgent: def __init__(self): print("BasicAgent initialized.")
def __call__(self, question: str) -> str: print(f"Agent received question (first 50 chars): {question[:50]}...") fixed_answer = "This is a default answer." print(f"Agent returning fixed answer: {fixed_answer}") return fixed_answer
def instantiate_agent(): """Instantiates the agent.""" try: # agent = BasicAgent() agent = SmolAgent() # Use the new agent return agent, None # Return agent and no error except Exception as e: print(f"Error instantiating agent: {e}") return None, f"Error initializing agent: {e}" # Return None and error message
def fetch_questions(questions_url: str): """Fetches questions from the specified URL.""" print(f"Fetching questions from: {questions_url}") try: response = requests.get(questions_url, timeout=15) response.raise_for_status() questions_data = response.json() if not questions_data: print("Fetched questions list is empty.") return None, "Fetched questions list is empty or invalid format." print(f"Fetched {len(questions_data)} questions.") return questions_data, None # Return data and no error except requests.exceptions.RequestException as e: print(f"Error fetching questions: {e}") return None, f"Error fetching questions: {e}" except requests.exceptions.JSONDecodeError as e: print(f"Error decoding JSON response from questions endpoint: {e}") print(f"Response text: {response.text[:500]}") return None, f"Error decoding server response for questions: {e}" except Exception as e: print(f"An unexpected error occurred fetching questions: {e}") return None, f"An unexpected error occurred fetching questions: {e}"
def run_agent_on_questions(agent, questions_data): """Runs the agent on each question and collects results.""" results_log = [] answers_payload = [] print(f"Running agent on {len(questions_data)} questions...") for item in questions_data: task_id = item.get("task_id") question_text = item.get("question") if not task_id or question_text is None: print(f"Skipping item with missing task_id or question: {item}") continue try: submitted_answer = agent(question_text) answers_payload.append( {"task_id": task_id, "submitted_answer": submitted_answer} ) results_log.append( { "Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer, } ) except Exception as e: print(f"Error running agent on task {task_id}: {e}") results_log.append( { "Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}", } ) return answers_payload, results_log
def dev_run(): """ Fetches all questions, runs the BasicAgent on them, and displays the results. """ api_url = DEFAULT_API_URL questions_url = f"{api_url}/questions"
agent, error_message = instantiate_agent() if error_message: return error_message, None # Return error message and None for results_df
# 2. Fetch Questions questions_data, error_message = fetch_questions(questions_url) if error_message: # Return the error message from fetch_questions and None for the results DataFrame return error_message, None
# 3. Run your Agent answers_payload, results_log = run_agent_on_questions(agent, questions_data)
if not answers_payload: print("Agent did not produce any answers to submit.") return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
return answers_payload, pd.DataFrame(results_log)
def run_and_submit_all(profile: gr.OAuthProfile | None): """ Fetches all questions, runs the BasicAgent on them, submits all answers, and displays the results. """ # --- Determine HF Space Runtime URL and Repo URL --- space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
if profile: username = f"{profile.username}" print(f"User logged in: {username}") else: print("User not logged in.") return "Please Login to Hugging Face with the button.", None
api_url = DEFAULT_API_URL questions_url = f"{api_url}/questions" submit_url = f"{api_url}/submit"
# 1. Instantiate Agent ( modify this part to create your agent) agent, error_message = instantiate_agent() if error_message: return error_message, None # Return error message and None for results_df
# In the case of an app running as a hugging Face space, this link points toward your codebase ( usefull for others so please keep it public) agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main" print(agent_code)
# 2. Fetch Questions questions_data, error_message = fetch_questions(questions_url) if error_message: # Return the error message from fetch_questions and None for the results DataFrame return error_message, None
# 3. Run your Agent answers_payload, results_log = run_agent_on_questions(agent, questions_data)
if not answers_payload: print("Agent did not produce any answers to submit.") return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
# 4. Prepare Submission submission_data = { "username": username.strip(), "agent_code": agent_code, "answers": answers_payload, } status_update = f"Agent finished. Submitting {len(answers_payload)} answers for user '{username}'..." print(status_update)
# 5. Submit print(f"Submitting {len(answers_payload)} answers to: {submit_url}") try: response = requests.post(submit_url, json=submission_data, timeout=60) response.raise_for_status() result_data = response.json() final_status = ( f"Submission Successful!\n" f"User: {result_data.get('username')}\n" f"Overall Score: {result_data.get('score', 'N/A')}% " f"({result_data.get('correct_count', '?')}/{result_data.get('total_attempted', '?')} correct)\n" f"Message: {result_data.get('message', 'No message received.')}" ) print("Submission successful.") results_df = pd.DataFrame(results_log) return final_status, results_df except requests.exceptions.HTTPError as e: error_detail = f"Server responded with status {e.response.status_code}." try: error_json = e.response.json() error_detail += f" Detail: {error_json.get('detail', e.response.text)}" except requests.exceptions.JSONDecodeError: error_detail += f" Response: {e.response.text[:500]}" status_message = f"Submission Failed: {error_detail}" print(status_message) results_df = pd.DataFrame(results_log) return status_message, results_df except requests.exceptions.Timeout: status_message = "Submission Failed: The request timed out." print(status_message) results_df = pd.DataFrame(results_log) return status_message, results_df except requests.exceptions.RequestException as e: status_message = f"Submission Failed: Network error - {e}" print(status_message) results_df = pd.DataFrame(results_log) return status_message, results_df except Exception as e: status_message = f"An unexpected error occurred during submission: {e}" print(status_message) results_df = pd.DataFrame(results_log) return status_message, results_df
# # --- Build Gradio Interface using Blocks ---# with gr.Blocks() as demo:# gr.Markdown("# Basic Agent Evaluation Runner")# gr.Markdown(# """# **Instructions:**
# 1. Please clone this space, then modify the code to define your agent's logic, the tools, the necessary packages, etc ...# 2. Log in to your Hugging Face account using the button below. This uses your HF username for submission.# 3. Click 'Run Evaluation & Submit All Answers' to fetch questions, run your agent, submit answers, and see the score.
# ---# **Disclaimers:**# Once clicking on the "submit button, it can take quite some time ( this is the time for the agent to go through all the questions).# This space provides a basic setup and is intentionally sub-optimal to encourage you to develop your own, more robust solution. For instance for the delay process of the submit button, a solution could be to cache the answers and submit in a seperate action or even to answer the questions in async.# """# )
# gr.LoginButton()
# run_button = gr.Button("Run Evaluation & Submit All Answers")
# status_output = gr.Textbox(# label="Run Status / Submission Result", lines=5, interactive=False# )# # Removed max_rows=10 from DataFrame constructor# results_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)
# run_button.click(fn=run_and_submit_all, outputs=[status_output, results_table])
# if __name__ == "__main__":# print("\n" + "-" * 30 + " App Starting " + "-" * 30)# # Check for SPACE_HOST and SPACE_ID at startup for information# space_host_startup = os.getenv("SPACE_HOST")# space_id_startup = os.getenv("SPACE_ID") # Get SPACE_ID at startup
# if space_host_startup:# print(f"✅ SPACE_HOST found: {space_host_startup}")# print(f" Runtime URL should be: https://{space_host_startup}.hf.space")# else:# print("ℹ️ SPACE_HOST environment variable not found (running locally?).")
# if space_id_startup: # Print repo URLs if SPACE_ID is found# print(f"✅ SPACE_ID found: {space_id_startup}")# print(f" Repo URL: https://huggingface.co/spaces/{space_id_startup}")# print(# f" Repo Tree URL: https://huggingface.co/spaces/{space_id_startup}/tree/main"# )# else:# print(# "ℹ️ SPACE_ID environment variable not found (running locally?). Repo URL cannot be determined."# )
# print("-" * (60 + len(" App Starting ")) + "\n")
# print("Launching Gradio Interface for Basic Agent Evaluation...")# demo.launch(debug=True, share=False)
if __name__ == "__main__": answers_payload, results_log = dev_run() print(answers_payload) print(results_log)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177import osimport time
import httpximport warningsfrom typing import List, Dict, Optionalfrom smolagents import ApiModel, ChatMessage
class GeminiApiModel(ApiModel): """ ApiModel implementation using the Google Gemini API via direct HTTP requests. """
def __init__( self, model_id: str = "gemini-pro", api_key: Optional[str] = None, **kwargs, ): """ Initializes the GeminiApiModel.
Args: model_id (str): The Gemini model ID to use (e.g., "gemini-pro"). api_key (str, optional): Google AI Studio API key. Defaults to GEMINI_API_KEY environment variable. **kwargs: Additional keyword arguments passed to the parent ApiModel. """ self.model_id = model_id # Prefer explicitly passed key, fallback to environment variable self.api_key = api_key if api_key else os.environ.get("GEMINI_API_KEY") if not self.api_key: warnings.warn( "GEMINI_API_KEY not provided via argument or environment variable. API calls will likely fail.", UserWarning, ) # Gemini API doesn't inherently support complex role structures or function calling like OpenAI. # We'll flatten messages for simplicity. super().__init__( model_id=model_id, flatten_messages_as_text=True, # Flatten messages to a single text prompt **kwargs, )
def create_client(self): """No dedicated client needed as we use httpx directly.""" return None # Or potentially return httpx client if reused
def __call__( self, messages: List[Dict[str, str]], stop_sequences: Optional[ List[str] ] = None, # Note: Gemini API might not support stop sequences directly here grammar: Optional[ str ] = None, # Note: Gemini API doesn't support grammar directly tools_to_call_from: Optional[ List["Tool"] ] = None, # Note: Basic Gemini API doesn't support tools **kwargs, ) -> ChatMessage: """ Calls the Google Gemini API with the provided messages.
Args: messages: A list of message dictionaries (e.g., [{'role': 'user', 'content': '...'}]). stop_sequences: Optional stop sequences (may not be supported). grammar: Optional grammar constraint (not supported). tools_to_call_from: Optional list of tools (not supported). **kwargs: Additional keyword arguments.
Returns: A ChatMessage object containing the response. """ if not self.api_key: raise ValueError("GEMINI_API_KEY is not set.")
# Prepare the prompt by concatenating message content # The Gemini Pro basic API expects a simple text prompt. prompt = self._messages_to_prompt(messages) prompt += ( "\n\n" + "If you have a result from a web search that looks helpful, please use httpx to get the HTML from the URL listed." + "You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER]. YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string." ) # print(f"--- Gemini API prompt: ---\n{prompt}\n--- End of prompt ---")
url = f"https://generativelanguage.googleapis.com/v1beta/models/{self.model_id}:generateContent?key={self.api_key}" headers = {"Content-Type": "application/json"} # Construct the payload according to Gemini API requirements data = {"contents": [{"parts": [{"text": prompt}]}]}
# Add generation config if provided via kwargs (optional) generation_config = {} if "temperature" in kwargs: generation_config["temperature"] = kwargs["temperature"] if "max_output_tokens" in kwargs: generation_config["maxOutputTokens"] = kwargs["max_output_tokens"] # Add other relevant config parameters here if needed
if generation_config: data["generationConfig"] = generation_config
# Handle stop sequences if provided (basic support) # Note: This is a best-effort addition, check Gemini API docs for formal support if stop_sequences: if "generationConfig" not in data: data["generationConfig"] = {} # Assuming Gemini API might support 'stopSequences' in generationConfig data["generationConfig"]["stopSequences"] = stop_sequences
raw_response = None try: response = httpx.post( url, headers=headers, json=data, timeout=120.0 ) # Increased timeout time.sleep(6) # Add delay to respect rate limits response.raise_for_status() response_json = response.json() raw_response = response_json # Store raw response
# Parse the response - adjust based on actual Gemini API structure if "candidates" in response_json and response_json["candidates"]: part = response_json["candidates"][0]["content"]["parts"][0] if "text" in part: content = part["text"] # Simulate token counts if available, otherwise default to 0 # The basic generateContent API might not return usage directly in the main response # It might be in safetyRatings or other metadata if enabled/available. # Setting to 0 for now as it's not reliably present in the simplest call. self.last_input_token_count = 0 self.last_output_token_count = 0 # If usage data becomes available in response_json, parse it here: # e.g., if response_json.get("usageMetadata"): # self.last_input_token_count = response_json["usageMetadata"].get("promptTokenCount", 0) # self.last_output_token_count = response_json["usageMetadata"].get("candidatesTokenCount", 0)
return ChatMessage( role="assistant", content=content, raw=raw_response )
# Handle cases where the expected response structure isn't found error_content = f"Error or unexpected response format: {response_json}" return ChatMessage( role="assistant", content=error_content, raw=raw_response )
except httpx.RequestError as exc: error_content = ( f"An error occurred while requesting {exc.request.url!r}: {exc}" ) return ChatMessage( role="assistant", content=error_content, raw={"error": str(exc)} ) except httpx.HTTPStatusError as exc: error_content = f"Error response {exc.response.status_code} while requesting {exc.request.url!r}: {exc.response.text}" return ChatMessage( role="assistant", content=error_content, raw={ "error": str(exc), "status_code": exc.response.status_code, "response_text": exc.response.text, }, ) except Exception as e: error_content = f"An unexpected error occurred: {e}" return ChatMessage( role="assistant", content=error_content, raw={"error": str(e)} )
def _messages_to_prompt(self, messages: List[Dict[str, str]]) -> str: """Converts a list of messages into a single string prompt.""" # Simple concatenation, could be more sophisticated based on roles if needed # Ensure we handle cases where 'content' might not be a string (though it should be) return "\n".join([str(msg.get("content", "")) for msg in messages])1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312version: 6environments: default: channels: - url: https://conda.modular.com/max-nightly/ - url: https://conda.modular.com/max/ - url: https://repo.prefix.dev/modular-community/ - url: https://conda.anaconda.org/conda-forge/ indexes: - https://pypi.org/simple packages: linux-64: - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.4.26-hbd8a1cb_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.43-h712a8e2_4.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.7.0-h5888daf_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.6-h2dba641_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.2.0-h767d61c_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-14.2.0-h69a702a_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.2.0-h767d61c_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/liblzma-5.8.1-hb9d3cd8_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libmpdec-4.0.0-h4bc722e_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.49.1-hee588c1_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.5.0-h7b32b05_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.13.3-hf636f53_101_cp313.conda - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.13-7_cp313.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8c095d6_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda - pypi: https://files.pythonhosted.org/packages/a5/45/30bb92d442636f570cb5651bc661f52b610e2eec3f891a5dc3a4c3667db0/aiofiles-24.1.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/a1/ee/48ca1a7c89ffec8b6a0c5d02b89c305671d5ffd8d3c94acf8b8c408575bb/anyio-4.9.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/7a/1d/54f4c58bae8dc8c64a75071c7e98e105ddaca35449376fcb0180f6e3c9df/audioop_lts-0.2.1-cp313-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: https://files.pythonhosted.org/packages/50/cd/30110dc0ffcf3b131156077b90e9f60ed75711223f306da4db08eff8403b/beautifulsoup4-4.13.4-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/4a/7e/3db2bd1b1f9e95f7cddca6d6e75e2f2bd9f51b1246e546d88addca0106bd/certifi-2025.4.26-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/52/ed/b7f4f07de100bdb95c1756d3a4d17b90c1a3c53715c1a476f8738058e0fa/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/83/a2/66adca41164860dee6d2d47b506fef3262c8879aab727b687c798d67313f/duckduckgo_search-8.0.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/50/b3/b51f09c2ba432a576fe63758bddc81f78f0c6309d9e5c10d194313bf021e/fastapi-0.115.12-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/53/5d/65f40bd333463b3230b3a72d93873caaf49b0cbb5228598fafb75fcc5357/ffmpy-0.5.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/4d/36/2a115987e2d8c300a974597416d9de88f2444426de9571f4b59b2cca3acc/filelock-3.18.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/44/4b/e0cfc1a6f17e990f3e64b7d941ddc4acdc7b19d6edd51abf495f32b1a9e4/fsspec-2025.3.2-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/c2/81/c02b50e8cf0e82a1ec284ee413f377fb755d93fdc9e9d3eba2400c321117/gradio-5.27.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/7f/8a/46f40c96306abf6c9be48ac826425711a9b005fbc8cd6edc1661fd5d85ac/gradio_client-1.9.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/28/27/3d6dcadc8a3214d8522c1e7f6a19554e33659be44546d44a2f7572ac7d2a/groovy-0.1.2-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/93/27/1fb384a841e9661faad1c31cbfa62864f59632e876df5d795234da51c395/huggingface_hub-0.30.2-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/2f/04/6ef935dc74e729932e39478e44d8cfe6a83550552eaa072b7c05f6f22488/lxml-5.4.0-cp313-cp313-manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/64/11/b751af7ad41b254a802cf52f7bc1fca7cabe2388132f2ce60a1a6b9b9622/markdownify-1.1.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/aa/fc/ebfd32c3e124e6a1043e19c0ab0769818aa69050ce5589b63d05ff185526/numpy-2.2.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: https://files.pythonhosted.org/packages/d1/d0/e9e38aff63e1d7bbcb818e6f8d4df1056b7f8aeb3b660370e0d41dbc394c/orjson-3.10.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e8/31/aa8da88ca0eadbabd0a639788a6da13bb2ff6edbbb9f29aa786450a30a91/pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: https://files.pythonhosted.org/packages/13/eb/2552ecebc0b887f539111c2cd241f538b8ff5891b8903dfe672e997529be/pillow-11.2.1-cp313-cp313-manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/c3/7b/cbd5d999a07ff2a21465975d4eb477ae6f69765e8fe8c9087dab250180d8/primp-0.15.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: https://files.pythonhosted.org/packages/e7/12/46b65f3534d099349e38ef6ec98b1a5a81f42536d17e0ba382c28c67ba67/pydantic-2.11.4-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/eb/3c/f4abd740877a35abade05e437245b192f9d0ffb48bbbbd708df33d3cda37/pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: https://files.pythonhosted.org/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/1e/18/98a99ad95133c6a6e2005fe89faedf294a748bd5dc803008059409ac9b1e/python_dotenv-1.1.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/45/58/38b5afbc1a800eeea951b9285d3912613f2603bdf897a4ab0f4bd7f405fc/python_multipart-0.0.20-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/04/24/b7721e4845c2f162d26f50521b825fb061bc0a5afcf9a386840f23ea19fa/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/0d/9b/63f4c7ebc259242c89b3acafdb37b41d1185c07ff0011164674e9076b491/rich-14.0.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/0e/2c/1e364cc92970075d7d04c69c928430b23e43a433f044474f57e425cbed37/ruff-0.11.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: https://files.pythonhosted.org/packages/4d/c0/1108ad9f01567f66b3154063605b350b69c3c9366732e09e45f9fd0d1deb/safehttpx-0.1.6-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/2f/ce/dedad549d2b37e73d14c56aef25bd42a5f87fdb8e97bf2a78cac5aac8287/smolagents-1.14.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e7/9c/0e6afc12c269578be5c0c1c9f4b49a8d32770a080260c333ac04cc1c832d/soupsieve-2.7-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/8b/0c/9d30a4ebeb6db2b25a841afbb80f6ef9a854fc3b41be131d249a977b4959/starlette-0.46.2-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/f9/b6/a447b5e4ec71e13871be01ba81f5dfc9d0af7e473da256ff46bc0e24026f/tomlkit-0.13.2-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/48/20/9d953de6f4367163d23ec823200eb3ecb0050a2609691e512c8b95827a9b/typer-0.15.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/8b/54/b1ae86c0973cc6f0210b53d508ca3641fb6d0c56823f288d108bc7ab3cc8/typing_extensions-4.13.2-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/31/08/aa4fdfb71f7de5176385bd9e90852eaf6b5d622735020ad600f2bab54385/typing_inspection-0.4.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/5c/23/c7abc0ca0a1526a0774eca151daeb8de62ec457e77262b66b359c3c7679e/tzdata-2025.2-py2.py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/6b/11/cc635220681e93a0183390e26485430ca2c7b5f9d33b15c74c2861cb8091/urllib3-2.4.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/b1/4b/4cef6ce21a2aaca9d852a6e84ef4f135d99fcd74fa75105e2fc0c8308acd/uvicorn-0.34.2-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/ff/b2/83a6ddf56cdcbad4e3d841fcc55d6ba7d19aeb89c50f24dd7e859ec0805f/websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl - pypi: .packages:- conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726 md5: d7c89558ba9fa0495403155b64376d81 license: None purls: [] size: 2562 timestamp: 1578324546067- conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 build_number: 16 sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22 md5: 73aaf86a425cc6e73fcf236a5a46396d depends: - _libgcc_mutex 0.1 conda_forge - libgomp >=7.5.0 constrains: - openmp_impl 9999 license: BSD-3-Clause license_family: BSD purls: [] size: 23621 timestamp: 1650670423406- pypi: https://files.pythonhosted.org/packages/a5/45/30bb92d442636f570cb5651bc661f52b610e2eec3f891a5dc3a4c3667db0/aiofiles-24.1.0-py3-none-any.whl name: aiofiles version: 24.1.0 sha256: b4ec55f4195e3eb5d7abd1bf7e061763e864dd4954231fb8539a0ef8bb8260e5 requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl name: annotated-types version: 0.7.0 sha256: 1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53 requires_dist: - typing-extensions>=4.0.0 ; python_full_version < '3.9' requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/a1/ee/48ca1a7c89ffec8b6a0c5d02b89c305671d5ffd8d3c94acf8b8c408575bb/anyio-4.9.0-py3-none-any.whl name: anyio version: 4.9.0 sha256: 9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c requires_dist: - exceptiongroup>=1.0.2 ; python_full_version < '3.11' - idna>=2.8 - sniffio>=1.1 - typing-extensions>=4.5 ; python_full_version < '3.13' - trio>=0.26.1 ; extra == 'trio' - anyio[trio] ; extra == 'test' - blockbuster>=1.5.23 ; extra == 'test' - coverage[toml]>=7 ; extra == 'test' - exceptiongroup>=1.2.0 ; extra == 'test' - hypothesis>=4.0 ; extra == 'test' - psutil>=5.9 ; extra == 'test' - pytest>=7.0 ; extra == 'test' - trustme ; extra == 'test' - truststore>=0.9.1 ; python_full_version >= '3.10' and extra == 'test' - uvloop>=0.21 ; python_full_version < '3.14' and platform_python_implementation == 'CPython' and sys_platform != 'win32' and extra == 'test' - packaging ; extra == 'doc' - sphinx~=8.2 ; extra == 'doc' - sphinx-rtd-theme ; extra == 'doc' - sphinx-autodoc-typehints>=1.2.0 ; extra == 'doc' requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/7a/1d/54f4c58bae8dc8c64a75071c7e98e105ddaca35449376fcb0180f6e3c9df/audioop_lts-0.2.1-cp313-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: audioop-lts version: 0.2.1 sha256: c589f06407e8340e81962575fcffbba1e92671879a221186c3d4662de9fe804e requires_python: '>=3.13'- pypi: https://files.pythonhosted.org/packages/50/cd/30110dc0ffcf3b131156077b90e9f60ed75711223f306da4db08eff8403b/beautifulsoup4-4.13.4-py3-none-any.whl name: beautifulsoup4 version: 4.13.4 sha256: 9bbbb14bfde9d79f38b8cd5f8c7c85f4b8f2523190ebed90e950a8dea4cb1c4b requires_dist: - soupsieve>1.2 - typing-extensions>=4.0.0 - cchardet ; extra == 'cchardet' - chardet ; extra == 'chardet' - charset-normalizer ; extra == 'charset-normalizer' - html5lib ; extra == 'html5lib' - lxml ; extra == 'lxml' requires_python: '>=3.7.0'- conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda sha256: 5ced96500d945fb286c9c838e54fa759aa04a7129c59800f0846b4335cee770d md5: 62ee74e96c5ebb0af99386de58cf9553 depends: - __glibc >=2.17,<3.0.a0 - libgcc-ng >=12 license: bzip2-1.0.6 license_family: BSD purls: [] size: 252783 timestamp: 1720974456583- conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.4.26-hbd8a1cb_0.conda sha256: 2a70ed95ace8a3f8a29e6cd1476a943df294a7111dfb3e152e3478c4c889b7ac md5: 95db94f75ba080a22eb623590993167b depends: - __unix license: ISC purls: [] size: 152283 timestamp: 1745653616541- pypi: https://files.pythonhosted.org/packages/4a/7e/3db2bd1b1f9e95f7cddca6d6e75e2f2bd9f51b1246e546d88addca0106bd/certifi-2025.4.26-py3-none-any.whl name: certifi version: 2025.4.26 sha256: 30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3 requires_python: '>=3.6'- pypi: https://files.pythonhosted.org/packages/52/ed/b7f4f07de100bdb95c1756d3a4d17b90c1a3c53715c1a476f8738058e0fa/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: charset-normalizer version: 3.4.1 sha256: 955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11 requires_python: '>=3.7'- pypi: https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl name: click version: 8.1.8 sha256: 63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2 requires_dist: - colorama ; sys_platform == 'win32' - importlib-metadata ; python_full_version < '3.8' requires_python: '>=3.7'- pypi: https://files.pythonhosted.org/packages/83/a2/66adca41164860dee6d2d47b506fef3262c8879aab727b687c798d67313f/duckduckgo_search-8.0.1-py3-none-any.whl name: duckduckgo-search version: 8.0.1 sha256: 87ea18d9abb1cd5dc8f63fc70ac867996acce2cb5e0129d191b9491c202420be requires_dist: - click>=8.1.8 - primp>=0.15.0 - lxml>=5.3.0 - mypy>=1.14.1 ; extra == 'dev' - pytest>=8.3.4 ; extra == 'dev' - pytest-dependency>=0.6.0 ; extra == 'dev' - ruff>=0.9.2 ; extra == 'dev' requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/50/b3/b51f09c2ba432a576fe63758bddc81f78f0c6309d9e5c10d194313bf021e/fastapi-0.115.12-py3-none-any.whl name: fastapi version: 0.115.12 sha256: e94613d6c05e27be7ffebdd6ea5f388112e5e430c8f7d6494a9d1d88d43e814d requires_dist: - starlette>=0.40.0,<0.47.0 - pydantic>=1.7.4,!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0 - typing-extensions>=4.8.0 - fastapi-cli[standard]>=0.0.5 ; extra == 'standard' - httpx>=0.23.0 ; extra == 'standard' - jinja2>=3.1.5 ; extra == 'standard' - python-multipart>=0.0.18 ; extra == 'standard' - email-validator>=2.0.0 ; extra == 'standard' - uvicorn[standard]>=0.12.0 ; extra == 'standard' - fastapi-cli[standard]>=0.0.5 ; extra == 'all' - httpx>=0.23.0 ; extra == 'all' - jinja2>=3.1.5 ; extra == 'all' - python-multipart>=0.0.18 ; extra == 'all' - itsdangerous>=1.1.0 ; extra == 'all' - pyyaml>=5.3.1 ; extra == 'all' - ujson>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0 ; extra == 'all' - orjson>=3.2.1 ; extra == 'all' - email-validator>=2.0.0 ; extra == 'all' - uvicorn[standard]>=0.12.0 ; extra == 'all' - pydantic-settings>=2.0.0 ; extra == 'all' - pydantic-extra-types>=2.0.0 ; extra == 'all' requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/53/5d/65f40bd333463b3230b3a72d93873caaf49b0cbb5228598fafb75fcc5357/ffmpy-0.5.0-py3-none-any.whl name: ffmpy version: 0.5.0 sha256: df3799cf5816daa56d4959a023630ee53c6768b66009dae6d131519ba4b80233 requires_python: '>=3.8,<4.0'- pypi: https://files.pythonhosted.org/packages/4d/36/2a115987e2d8c300a974597416d9de88f2444426de9571f4b59b2cca3acc/filelock-3.18.0-py3-none-any.whl name: filelock version: 3.18.0 sha256: c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de requires_dist: - furo>=2024.8.6 ; extra == 'docs' - sphinx-autodoc-typehints>=3 ; extra == 'docs' - sphinx>=8.1.3 ; extra == 'docs' - covdefaults>=2.3 ; extra == 'testing' - coverage>=7.6.10 ; extra == 'testing' - diff-cover>=9.2.1 ; extra == 'testing' - pytest-asyncio>=0.25.2 ; extra == 'testing' - pytest-cov>=6 ; extra == 'testing' - pytest-mock>=3.14 ; extra == 'testing' - pytest-timeout>=2.3.1 ; extra == 'testing' - pytest>=8.3.4 ; extra == 'testing' - virtualenv>=20.28.1 ; extra == 'testing' - typing-extensions>=4.12.2 ; python_full_version < '3.11' and extra == 'typing' requires_python: '>=3.9'- pypi: . name: final-assignment-template version: 0.1.0 sha256: a05c68e03552cf851f097ff5f9e3403a789313efb75704b90c26bf2d87409030 requires_dist: - smolagents>=1.14.0,<2 - gradio>=5.27.1,<6 - requests>=2.32.3,<3 - httpx>=0.28.1,<0.29 - beautifulsoup4>=4.13.4,<5 requires_python: '>=3.11' editable: true- pypi: https://files.pythonhosted.org/packages/44/4b/e0cfc1a6f17e990f3e64b7d941ddc4acdc7b19d6edd51abf495f32b1a9e4/fsspec-2025.3.2-py3-none-any.whl name: fsspec version: 2025.3.2 sha256: 2daf8dc3d1dfa65b6aa37748d112773a7a08416f6c70d96b264c96476ecaf711 requires_dist: - adlfs ; extra == 'abfs' - adlfs ; extra == 'adl' - pyarrow>=1 ; extra == 'arrow' - dask ; extra == 'dask' - distributed ; extra == 'dask' - pre-commit ; extra == 'dev' - ruff ; extra == 'dev' - numpydoc ; extra == 'doc' - sphinx ; extra == 'doc' - sphinx-design ; extra == 'doc' - sphinx-rtd-theme ; extra == 'doc' - yarl ; extra == 'doc' - dropbox ; extra == 'dropbox' - dropboxdrivefs ; extra == 'dropbox' - requests ; extra == 'dropbox' - adlfs ; extra == 'full' - aiohttp!=4.0.0a0,!=4.0.0a1 ; extra == 'full' - dask ; extra == 'full' - distributed ; extra == 'full' - dropbox ; extra == 'full' - dropboxdrivefs ; extra == 'full' - fusepy ; extra == 'full' - gcsfs ; extra == 'full' - libarchive-c ; extra == 'full' - ocifs ; extra == 'full' - panel ; extra == 'full' - paramiko ; extra == 'full' - pyarrow>=1 ; extra == 'full' - pygit2 ; extra == 'full' - requests ; extra == 'full' - s3fs ; extra == 'full' - smbprotocol ; extra == 'full' - tqdm ; extra == 'full' - fusepy ; extra == 'fuse' - gcsfs ; extra == 'gcs' - pygit2 ; extra == 'git' - requests ; extra == 'github' - gcsfs ; extra == 'gs' - panel ; extra == 'gui' - pyarrow>=1 ; extra == 'hdfs' - aiohttp!=4.0.0a0,!=4.0.0a1 ; extra == 'http' - libarchive-c ; extra == 'libarchive' - ocifs ; extra == 'oci' - s3fs ; extra == 's3' - paramiko ; extra == 'sftp' - smbprotocol ; extra == 'smb' - paramiko ; extra == 'ssh' - aiohttp!=4.0.0a0,!=4.0.0a1 ; extra == 'test' - numpy ; extra == 'test' - pytest ; extra == 'test' - pytest-asyncio!=0.22.0 ; extra == 'test' - pytest-benchmark ; extra == 'test' - pytest-cov ; extra == 'test' - pytest-mock ; extra == 'test' - pytest-recording ; extra == 'test' - pytest-rerunfailures ; extra == 'test' - requests ; extra == 'test' - aiobotocore>=2.5.4,<3.0.0 ; extra == 'test-downstream' - dask[dataframe,test] ; extra == 'test-downstream' - moto[server]>4,<5 ; extra == 'test-downstream' - pytest-timeout ; extra == 'test-downstream' - xarray ; extra == 'test-downstream' - adlfs ; extra == 'test-full' - aiohttp!=4.0.0a0,!=4.0.0a1 ; extra == 'test-full' - cloudpickle ; extra == 'test-full' - dask ; extra == 'test-full' - distributed ; extra == 'test-full' - dropbox ; extra == 'test-full' - dropboxdrivefs ; extra == 'test-full' - fastparquet ; extra == 'test-full' - fusepy ; extra == 'test-full' - gcsfs ; extra == 'test-full' - jinja2 ; extra == 'test-full' - kerchunk ; extra == 'test-full' - libarchive-c ; extra == 'test-full' - lz4 ; extra == 'test-full' - notebook ; extra == 'test-full' - numpy ; extra == 'test-full' - ocifs ; extra == 'test-full' - pandas ; extra == 'test-full' - panel ; extra == 'test-full' - paramiko ; extra == 'test-full' - pyarrow ; extra == 'test-full' - pyarrow>=1 ; extra == 'test-full' - pyftpdlib ; extra == 'test-full' - pygit2 ; extra == 'test-full' - pytest ; extra == 'test-full' - pytest-asyncio!=0.22.0 ; extra == 'test-full' - pytest-benchmark ; extra == 'test-full' - pytest-cov ; extra == 'test-full' - pytest-mock ; extra == 'test-full' - pytest-recording ; extra == 'test-full' - pytest-rerunfailures ; extra == 'test-full' - python-snappy ; extra == 'test-full' - requests ; extra == 'test-full' - smbprotocol ; extra == 'test-full' - tqdm ; extra == 'test-full' - urllib3 ; extra == 'test-full' - zarr ; extra == 'test-full' - zstandard ; extra == 'test-full' - tqdm ; extra == 'tqdm' requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/c2/81/c02b50e8cf0e82a1ec284ee413f377fb755d93fdc9e9d3eba2400c321117/gradio-5.27.1-py3-none-any.whl name: gradio version: 5.27.1 sha256: b13c621a445e7d3fe688e7ecf0481329c309eaac59c842cb598420bdf4188a0e requires_dist: - aiofiles>=22.0,<25.0 - anyio>=3.0,<5.0 - audioop-lts<1.0 ; python_full_version >= '3.13' - fastapi>=0.115.2,<1.0 - ffmpy - gradio-client==1.9.1 - groovy~=0.1 - httpx>=0.24.1 - huggingface-hub>=0.28.1 - jinja2<4.0 - markupsafe>=2.0,<4.0 - numpy>=1.0,<3.0 - orjson~=3.0 - packaging - pandas>=1.0,<3.0 - pillow>=8.0,<12.0 - pydantic>=2.0,<2.12 - pydub - python-multipart>=0.0.18 - pyyaml>=5.0,<7.0 - ruff>=0.9.3 ; sys_platform != 'emscripten' - safehttpx>=0.1.6,<0.2.0 - semantic-version~=2.0 - starlette>=0.40.0,<1.0 ; sys_platform != 'emscripten' - tomlkit>=0.12.0,<0.14.0 - typer>=0.12,<1.0 ; sys_platform != 'emscripten' - typing-extensions~=4.0 - urllib3~=2.0 ; sys_platform == 'emscripten' - uvicorn>=0.14.0 ; sys_platform != 'emscripten' - authlib ; extra == 'oauth' - itsdangerous ; extra == 'oauth' requires_python: '>=3.10'- pypi: https://files.pythonhosted.org/packages/7f/8a/46f40c96306abf6c9be48ac826425711a9b005fbc8cd6edc1661fd5d85ac/gradio_client-1.9.1-py3-none-any.whl name: gradio-client version: 1.9.1 sha256: 1db4ccc5777f987c5c4e4b5b13d67ebe1f4514de526fbf9619abe69c55aeac8a requires_dist: - fsspec - httpx>=0.24.1 - huggingface-hub>=0.19.3 - packaging - typing-extensions~=4.0 - websockets>=10.0,<16.0 requires_python: '>=3.10'- pypi: https://files.pythonhosted.org/packages/28/27/3d6dcadc8a3214d8522c1e7f6a19554e33659be44546d44a2f7572ac7d2a/groovy-0.1.2-py3-none-any.whl name: groovy version: 0.1.2 sha256: 7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64 requires_dist: - pytest ; extra == 'dev' - ruff==0.9.3 ; extra == 'dev' requires_python: '>3.9'- pypi: https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl name: h11 version: 0.16.0 sha256: 63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl name: httpcore version: 1.0.9 sha256: 2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55 requires_dist: - certifi - h11>=0.16 - anyio>=4.0,<5.0 ; extra == 'asyncio' - h2>=3,<5 ; extra == 'http2' - socksio==1.* ; extra == 'socks' - trio>=0.22.0,<1.0 ; extra == 'trio' requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl name: httpx version: 0.28.1 sha256: d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad requires_dist: - anyio - certifi - httpcore==1.* - idna - brotli ; platform_python_implementation == 'CPython' and extra == 'brotli' - brotlicffi ; platform_python_implementation != 'CPython' and extra == 'brotli' - click==8.* ; extra == 'cli' - pygments==2.* ; extra == 'cli' - rich>=10,<14 ; extra == 'cli' - h2>=3,<5 ; extra == 'http2' - socksio==1.* ; extra == 'socks' - zstandard>=0.18.0 ; extra == 'zstd' requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/93/27/1fb384a841e9661faad1c31cbfa62864f59632e876df5d795234da51c395/huggingface_hub-0.30.2-py3-none-any.whl name: huggingface-hub version: 0.30.2 sha256: 68ff05969927058cfa41df4f2155d4bb48f5f54f719dd0390103eefa9b191e28 requires_dist: - filelock - fsspec>=2023.5.0 - packaging>=20.9 - pyyaml>=5.1 - requests - tqdm>=4.42.1 - typing-extensions>=3.7.4.3 - inquirerpy==0.3.4 ; extra == 'all' - aiohttp ; extra == 'all' - jedi ; extra == 'all' - jinja2 ; extra == 'all' - pytest>=8.1.1,<8.2.2 ; extra == 'all' - pytest-cov ; extra == 'all' - pytest-env ; extra == 'all' - pytest-xdist ; extra == 'all' - pytest-vcr ; extra == 'all' - pytest-asyncio ; extra == 'all' - pytest-rerunfailures ; extra == 'all' - pytest-mock ; extra == 'all' - urllib3<2.0 ; extra == 'all' - soundfile ; extra == 'all' - pillow ; extra == 'all' - gradio>=4.0.0 ; extra == 'all' - numpy ; extra == 'all' - fastapi ; extra == 'all' - ruff>=0.9.0 ; extra == 'all' - mypy==1.5.1 ; extra == 'all' - libcst==1.4.0 ; extra == 'all' - typing-extensions>=4.8.0 ; extra == 'all' - types-pyyaml ; extra == 'all' - types-requests ; extra == 'all' - types-simplejson ; extra == 'all' - types-toml ; extra == 'all' - types-tqdm ; extra == 'all' - types-urllib3 ; extra == 'all' - inquirerpy==0.3.4 ; extra == 'cli' - inquirerpy==0.3.4 ; extra == 'dev' - aiohttp ; extra == 'dev' - jedi ; extra == 'dev' - jinja2 ; extra == 'dev' - pytest>=8.1.1,<8.2.2 ; extra == 'dev' - pytest-cov ; extra == 'dev' - pytest-env ; extra == 'dev' - pytest-xdist ; extra == 'dev' - pytest-vcr ; extra == 'dev' - pytest-asyncio ; extra == 'dev' - pytest-rerunfailures ; extra == 'dev' - pytest-mock ; extra == 'dev' - urllib3<2.0 ; extra == 'dev' - soundfile ; extra == 'dev' - pillow ; extra == 'dev' - gradio>=4.0.0 ; extra == 'dev' - numpy ; extra == 'dev' - fastapi ; extra == 'dev' - ruff>=0.9.0 ; extra == 'dev' - mypy==1.5.1 ; extra == 'dev' - libcst==1.4.0 ; extra == 'dev' - typing-extensions>=4.8.0 ; extra == 'dev' - types-pyyaml ; extra == 'dev' - types-requests ; extra == 'dev' - types-simplejson ; extra == 'dev' - types-toml ; extra == 'dev' - types-tqdm ; extra == 'dev' - types-urllib3 ; extra == 'dev' - toml ; extra == 'fastai' - fastai>=2.4 ; extra == 'fastai' - fastcore>=1.3.27 ; extra == 'fastai' - hf-transfer>=0.1.4 ; extra == 'hf-transfer' - hf-xet>=0.1.4 ; extra == 'hf-xet' - aiohttp ; extra == 'inference' - ruff>=0.9.0 ; extra == 'quality' - mypy==1.5.1 ; extra == 'quality' - libcst==1.4.0 ; extra == 'quality' - tensorflow ; extra == 'tensorflow' - pydot ; extra == 'tensorflow' - graphviz ; extra == 'tensorflow' - tensorflow ; extra == 'tensorflow-testing' - keras<3.0 ; extra == 'tensorflow-testing' - inquirerpy==0.3.4 ; extra == 'testing' - aiohttp ; extra == 'testing' - jedi ; extra == 'testing' - jinja2 ; extra == 'testing' - pytest>=8.1.1,<8.2.2 ; extra == 'testing' - pytest-cov ; extra == 'testing' - pytest-env ; extra == 'testing' - pytest-xdist ; extra == 'testing' - pytest-vcr ; extra == 'testing' - pytest-asyncio ; extra == 'testing' - pytest-rerunfailures ; extra == 'testing' - pytest-mock ; extra == 'testing' - urllib3<2.0 ; extra == 'testing' - soundfile ; extra == 'testing' - pillow ; extra == 'testing' - gradio>=4.0.0 ; extra == 'testing' - numpy ; extra == 'testing' - fastapi ; extra == 'testing' - torch ; extra == 'torch' - safetensors[torch] ; extra == 'torch' - typing-extensions>=4.8.0 ; extra == 'typing' - types-pyyaml ; extra == 'typing' - types-requests ; extra == 'typing' - types-simplejson ; extra == 'typing' - types-toml ; extra == 'typing' - types-tqdm ; extra == 'typing' - types-urllib3 ; extra == 'typing' requires_python: '>=3.8.0'- pypi: https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl name: idna version: '3.10' sha256: 946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 requires_dist: - ruff>=0.6.2 ; extra == 'all' - mypy>=1.11.2 ; extra == 'all' - pytest>=8.3.2 ; extra == 'all' - flake8>=7.1.1 ; extra == 'all' requires_python: '>=3.6'- pypi: https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl name: jinja2 version: 3.1.6 sha256: 85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 requires_dist: - markupsafe>=2.0 - babel>=2.7 ; extra == 'i18n' requires_python: '>=3.7'- conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.43-h712a8e2_4.conda sha256: db73f38155d901a610b2320525b9dd3b31e4949215c870685fd92ea61b5ce472 md5: 01f8d123c96816249efd255a31ad7712 depends: - __glibc >=2.17,<3.0.a0 constrains: - binutils_impl_linux-64 2.43 license: GPL-3.0-only license_family: GPL purls: [] size: 671240 timestamp: 1740155456116- conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.7.0-h5888daf_0.conda sha256: 33ab03438aee65d6aa667cf7d90c91e5e7d734c19a67aa4c7040742c0a13d505 md5: db0bfbe7dd197b68ad5f30333bae6ce0 depends: - __glibc >=2.17,<3.0.a0 - libgcc >=13 constrains: - expat 2.7.0.* license: MIT license_family: MIT purls: [] size: 74427 timestamp: 1743431794976- conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.6-h2dba641_1.conda sha256: 764432d32db45466e87f10621db5b74363a9f847d2b8b1f9743746cd160f06ab md5: ede4673863426c0883c0063d853bbd85 depends: - __glibc >=2.17,<3.0.a0 - libgcc >=13 license: MIT license_family: MIT purls: [] size: 57433 timestamp: 1743434498161- conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.2.0-h767d61c_2.conda sha256: 3a572d031cb86deb541d15c1875aaa097baefc0c580b54dc61f5edab99215792 md5: ef504d1acbd74b7cc6849ef8af47dd03 depends: - __glibc >=2.17,<3.0.a0 - _openmp_mutex >=4.5 constrains: - libgomp 14.2.0 h767d61c_2 - libgcc-ng ==14.2.0=*_2 license: GPL-3.0-only WITH GCC-exception-3.1 license_family: GPL purls: [] size: 847885 timestamp: 1740240653082- conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-14.2.0-h69a702a_2.conda sha256: fb7558c328b38b2f9d2e412c48da7890e7721ba018d733ebdfea57280df01904 md5: a2222a6ada71fb478682efe483ce0f92 depends: - libgcc 14.2.0 h767d61c_2 license: GPL-3.0-only WITH GCC-exception-3.1 license_family: GPL purls: [] size: 53758 timestamp: 1740240660904- conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.2.0-h767d61c_2.conda sha256: 1a3130e0b9267e781b89399580f3163632d59fe5b0142900d63052ab1a53490e md5: 06d02030237f4d5b3d9a7e7d348fe3c6 depends: - __glibc >=2.17,<3.0.a0 license: GPL-3.0-only WITH GCC-exception-3.1 license_family: GPL purls: [] size: 459862 timestamp: 1740240588123- conda: https://conda.anaconda.org/conda-forge/linux-64/liblzma-5.8.1-hb9d3cd8_0.conda sha256: f4f21dfc54b08d462f707b771ecce3fa9bc702a2a05b55654f64154f48b141ef md5: 0e87378639676987af32fee53ba32258 depends: - __glibc >=2.17,<3.0.a0 - libgcc >=13 license: 0BSD purls: [] size: 112709 timestamp: 1743771086123- conda: https://conda.anaconda.org/conda-forge/linux-64/libmpdec-4.0.0-h4bc722e_0.conda sha256: d02d1d3304ecaf5c728e515eb7416517a0b118200cd5eacbe829c432d1664070 md5: aeb98fdeb2e8f25d43ef71fbacbeec80 depends: - __glibc >=2.17,<3.0.a0 - libgcc-ng >=12 license: BSD-2-Clause license_family: BSD purls: [] size: 89991 timestamp: 1723817448345- conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.49.1-hee588c1_2.conda sha256: a086289bf75c33adc1daed3f1422024504ffb5c3c8b3285c49f025c29708ed16 md5: 962d6ac93c30b1dfc54c9cccafd1003e depends: - __glibc >=2.17,<3.0.a0 - libgcc >=13 - libzlib >=1.3.1,<2.0a0 license: Unlicense purls: [] size: 918664 timestamp: 1742083674731- conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda sha256: 787eb542f055a2b3de553614b25f09eefb0a0931b0c87dbcce6efdfd92f04f18 md5: 40b61aab5c7ba9ff276c41cfffe6b80b depends: - libgcc-ng >=12 license: BSD-3-Clause license_family: BSD purls: [] size: 33601 timestamp: 1680112270483- conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda sha256: d4bfe88d7cb447768e31650f06257995601f89076080e76df55e3112d4e47dc4 md5: edb0dca6bc32e4f4789199455a1dbeb8 depends: - __glibc >=2.17,<3.0.a0 - libgcc >=13 constrains: - zlib 1.3.1 *_2 license: Zlib license_family: Other purls: [] size: 60963 timestamp: 1727963148474- pypi: https://files.pythonhosted.org/packages/2f/04/6ef935dc74e729932e39478e44d8cfe6a83550552eaa072b7c05f6f22488/lxml-5.4.0-cp313-cp313-manylinux_2_28_x86_64.whl name: lxml version: 5.4.0 sha256: 1a42b3a19346e5601d1b8296ff6ef3d76038058f311902edd574461e9c036982 requires_dist: - cython>=3.0.11,<3.1.0 ; extra == 'source' - cssselect>=0.7 ; extra == 'cssselect' - html5lib ; extra == 'html5' - beautifulsoup4 ; extra == 'htmlsoup' - lxml-html-clean ; extra == 'html-clean' requires_python: '>=3.6'- pypi: https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl name: markdown-it-py version: 3.0.0 sha256: 355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 requires_dist: - mdurl~=0.1 - psutil ; extra == 'benchmarking' - pytest ; extra == 'benchmarking' - pytest-benchmark ; extra == 'benchmarking' - pre-commit~=3.0 ; extra == 'code-style' - commonmark~=0.9 ; extra == 'compare' - markdown~=3.4 ; extra == 'compare' - mistletoe~=1.0 ; extra == 'compare' - mistune~=2.0 ; extra == 'compare' - panflute~=2.3 ; extra == 'compare' - linkify-it-py>=1,<3 ; extra == 'linkify' - mdit-py-plugins ; extra == 'plugins' - gprof2dot ; extra == 'profiling' - mdit-py-plugins ; extra == 'rtd' - myst-parser ; extra == 'rtd' - pyyaml ; extra == 'rtd' - sphinx ; extra == 'rtd' - sphinx-copybutton ; extra == 'rtd' - sphinx-design ; extra == 'rtd' - sphinx-book-theme ; extra == 'rtd' - jupyter-sphinx ; extra == 'rtd' - coverage ; extra == 'testing' - pytest ; extra == 'testing' - pytest-cov ; extra == 'testing' - pytest-regressions ; extra == 'testing' requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/64/11/b751af7ad41b254a802cf52f7bc1fca7cabe2388132f2ce60a1a6b9b9622/markdownify-1.1.0-py3-none-any.whl name: markdownify version: 1.1.0 sha256: 32a5a08e9af02c8a6528942224c91b933b4bd2c7d078f9012943776fc313eeef requires_dist: - beautifulsoup4>=4.9,<5 - six>=1.15,<2- pypi: https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: markupsafe version: 3.0.2 sha256: 15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396 requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl name: mdurl version: 0.1.2 sha256: 84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 requires_python: '>=3.7'- conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda sha256: 3fde293232fa3fca98635e1167de6b7c7fda83caf24b9d6c91ec9eefb4f4d586 md5: 47e340acb35de30501a76c7c799c41d7 depends: - __glibc >=2.17,<3.0.a0 - libgcc >=13 license: X11 AND BSD-3-Clause purls: [] size: 891641 timestamp: 1738195959188- pypi: https://files.pythonhosted.org/packages/aa/fc/ebfd32c3e124e6a1043e19c0ab0769818aa69050ce5589b63d05ff185526/numpy-2.2.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: numpy version: 2.2.5 sha256: 2ba321813a00e508d5421104464510cc962a6f791aa2fca1c97b1e65027da80d requires_python: '>=3.10'- conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.5.0-h7b32b05_0.conda sha256: 38285d280f84f1755b7c54baf17eccf2e3e696287954ce0adca16546b85ee62c md5: bb539841f2a3fde210f387d00ed4bb9d depends: - __glibc >=2.17,<3.0.a0 - ca-certificates - libgcc >=13 license: Apache-2.0 license_family: Apache purls: [] size: 3121673 timestamp: 1744132167438- pypi: https://files.pythonhosted.org/packages/d1/d0/e9e38aff63e1d7bbcb818e6f8d4df1056b7f8aeb3b660370e0d41dbc394c/orjson-3.10.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: orjson version: 3.10.17 sha256: 3af3e11abf8bd77a2b82863eeedd847c694fd64a4f9cb6b1644015a5aef44b84 requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl name: packaging version: '25.0' sha256: 29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484 requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/e8/31/aa8da88ca0eadbabd0a639788a6da13bb2ff6edbbb9f29aa786450a30a91/pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: pandas version: 2.2.3 sha256: f3a255b2c19987fbbe62a9dfd6cff7ff2aa9ccab3fc75218fd4b7530f01efa24 requires_dist: - numpy>=1.22.4 ; python_full_version < '3.11' - numpy>=1.23.2 ; python_full_version == '3.11.*' - numpy>=1.26.0 ; python_full_version >= '3.12' - python-dateutil>=2.8.2 - pytz>=2020.1 - tzdata>=2022.7 - hypothesis>=6.46.1 ; extra == 'test' - pytest>=7.3.2 ; extra == 'test' - pytest-xdist>=2.2.0 ; extra == 'test' - pyarrow>=10.0.1 ; extra == 'pyarrow' - bottleneck>=1.3.6 ; extra == 'performance' - numba>=0.56.4 ; extra == 'performance' - numexpr>=2.8.4 ; extra == 'performance' - scipy>=1.10.0 ; extra == 'computation' - xarray>=2022.12.0 ; extra == 'computation' - fsspec>=2022.11.0 ; extra == 'fss' - s3fs>=2022.11.0 ; extra == 'aws' - gcsfs>=2022.11.0 ; extra == 'gcp' - pandas-gbq>=0.19.0 ; extra == 'gcp' - odfpy>=1.4.1 ; extra == 'excel' - openpyxl>=3.1.0 ; extra == 'excel' - python-calamine>=0.1.7 ; extra == 'excel' - pyxlsb>=1.0.10 ; extra == 'excel' - xlrd>=2.0.1 ; extra == 'excel' - xlsxwriter>=3.0.5 ; extra == 'excel' - pyarrow>=10.0.1 ; extra == 'parquet' - pyarrow>=10.0.1 ; extra == 'feather' - tables>=3.8.0 ; extra == 'hdf5' - pyreadstat>=1.2.0 ; extra == 'spss' - sqlalchemy>=2.0.0 ; extra == 'postgresql' - psycopg2>=2.9.6 ; extra == 'postgresql' - adbc-driver-postgresql>=0.8.0 ; extra == 'postgresql' - sqlalchemy>=2.0.0 ; extra == 'mysql' - pymysql>=1.0.2 ; extra == 'mysql' - sqlalchemy>=2.0.0 ; extra == 'sql-other' - adbc-driver-postgresql>=0.8.0 ; extra == 'sql-other' - adbc-driver-sqlite>=0.8.0 ; extra == 'sql-other' - beautifulsoup4>=4.11.2 ; extra == 'html' - html5lib>=1.1 ; extra == 'html' - lxml>=4.9.2 ; extra == 'html' - lxml>=4.9.2 ; extra == 'xml' - matplotlib>=3.6.3 ; extra == 'plot' - jinja2>=3.1.2 ; extra == 'output-formatting' - tabulate>=0.9.0 ; extra == 'output-formatting' - pyqt5>=5.15.9 ; extra == 'clipboard' - qtpy>=2.3.0 ; extra == 'clipboard' - zstandard>=0.19.0 ; extra == 'compression' - dataframe-api-compat>=0.1.7 ; extra == 'consortium-standard' - adbc-driver-postgresql>=0.8.0 ; extra == 'all' - adbc-driver-sqlite>=0.8.0 ; extra == 'all' - beautifulsoup4>=4.11.2 ; extra == 'all' - bottleneck>=1.3.6 ; extra == 'all' - dataframe-api-compat>=0.1.7 ; extra == 'all' - fastparquet>=2022.12.0 ; extra == 'all' - fsspec>=2022.11.0 ; extra == 'all' - gcsfs>=2022.11.0 ; extra == 'all' - html5lib>=1.1 ; extra == 'all' - hypothesis>=6.46.1 ; extra == 'all' - jinja2>=3.1.2 ; extra == 'all' - lxml>=4.9.2 ; extra == 'all' - matplotlib>=3.6.3 ; extra == 'all' - numba>=0.56.4 ; extra == 'all' - numexpr>=2.8.4 ; extra == 'all' - odfpy>=1.4.1 ; extra == 'all' - openpyxl>=3.1.0 ; extra == 'all' - pandas-gbq>=0.19.0 ; extra == 'all' - psycopg2>=2.9.6 ; extra == 'all' - pyarrow>=10.0.1 ; extra == 'all' - pymysql>=1.0.2 ; extra == 'all' - pyqt5>=5.15.9 ; extra == 'all' - pyreadstat>=1.2.0 ; extra == 'all' - pytest>=7.3.2 ; extra == 'all' - pytest-xdist>=2.2.0 ; extra == 'all' - python-calamine>=0.1.7 ; extra == 'all' - pyxlsb>=1.0.10 ; extra == 'all' - qtpy>=2.3.0 ; extra == 'all' - scipy>=1.10.0 ; extra == 'all' - s3fs>=2022.11.0 ; extra == 'all' - sqlalchemy>=2.0.0 ; extra == 'all' - tables>=3.8.0 ; extra == 'all' - tabulate>=0.9.0 ; extra == 'all' - xarray>=2022.12.0 ; extra == 'all' - xlrd>=2.0.1 ; extra == 'all' - xlsxwriter>=3.0.5 ; extra == 'all' - zstandard>=0.19.0 ; extra == 'all' requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/13/eb/2552ecebc0b887f539111c2cd241f538b8ff5891b8903dfe672e997529be/pillow-11.2.1-cp313-cp313-manylinux_2_28_x86_64.whl name: pillow version: 11.2.1 sha256: ad275964d52e2243430472fc5d2c2334b4fc3ff9c16cb0a19254e25efa03a155 requires_dist: - furo ; extra == 'docs' - olefile ; extra == 'docs' - sphinx>=8.2 ; extra == 'docs' - sphinx-copybutton ; extra == 'docs' - sphinx-inline-tabs ; extra == 'docs' - sphinxext-opengraph ; extra == 'docs' - olefile ; extra == 'fpx' - olefile ; extra == 'mic' - pyarrow ; extra == 'test-arrow' - check-manifest ; extra == 'tests' - coverage>=7.4.2 ; extra == 'tests' - defusedxml ; extra == 'tests' - markdown2 ; extra == 'tests' - olefile ; extra == 'tests' - packaging ; extra == 'tests' - pyroma ; extra == 'tests' - pytest ; extra == 'tests' - pytest-cov ; extra == 'tests' - pytest-timeout ; extra == 'tests' - trove-classifiers>=2024.10.12 ; extra == 'tests' - typing-extensions ; python_full_version < '3.10' and extra == 'typing' - defusedxml ; extra == 'xmp' requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/c3/7b/cbd5d999a07ff2a21465975d4eb477ae6f69765e8fe8c9087dab250180d8/primp-0.15.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: primp version: 0.15.0 sha256: c18b45c23f94016215f62d2334552224236217aaeb716871ce0e4dcfa08eb161 requires_dist: - certifi ; extra == 'dev' - pytest>=8.1.1 ; extra == 'dev' - pytest-asyncio>=0.25.3 ; extra == 'dev' - typing-extensions ; python_full_version < '3.12' and extra == 'dev' - mypy>=1.14.1 ; extra == 'dev' - ruff>=0.9.2 ; extra == 'dev' requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/e7/12/46b65f3534d099349e38ef6ec98b1a5a81f42536d17e0ba382c28c67ba67/pydantic-2.11.4-py3-none-any.whl name: pydantic version: 2.11.4 sha256: d9615eaa9ac5a063471da949c8fc16376a84afb5024688b3ff885693506764eb requires_dist: - annotated-types>=0.6.0 - pydantic-core==2.33.2 - typing-extensions>=4.12.2 - typing-inspection>=0.4.0 - email-validator>=2.0.0 ; extra == 'email' - tzdata ; python_full_version >= '3.9' and sys_platform == 'win32' and extra == 'timezone' requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/eb/3c/f4abd740877a35abade05e437245b192f9d0ffb48bbbbd708df33d3cda37/pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: pydantic-core version: 2.33.2 sha256: 9fdac5d6ffa1b5a83bca06ffe7583f5576555e6c8b3a91fbd25ea7780f825f7d requires_dist: - typing-extensions>=4.6.0,!=4.7.0 requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl name: pydub version: 0.25.1 sha256: 65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6- pypi: https://files.pythonhosted.org/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl name: pygments version: 2.19.1 sha256: 9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c requires_dist: - colorama>=0.4.6 ; extra == 'windows-terminal' requires_python: '>=3.8'- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.13.3-hf636f53_101_cp313.conda build_number: 101 sha256: eecb11ea60f8143deeb301eab2e04d04f7acb83659bb20fdfeacd431a5f31168 md5: 10622e12d649154af0bd76bcf33a7c5c depends: - __glibc >=2.17,<3.0.a0 - bzip2 >=1.0.8,<2.0a0 - ld_impl_linux-64 >=2.36.1 - libexpat >=2.7.0,<3.0a0 - libffi >=3.4.6,<3.5.0a0 - libgcc >=13 - liblzma >=5.8.1,<6.0a0 - libmpdec >=4.0.0,<5.0a0 - libsqlite >=3.49.1,<4.0a0 - libuuid >=2.38.1,<3.0a0 - libzlib >=1.3.1,<2.0a0 - ncurses >=6.5,<7.0a0 - openssl >=3.5.0,<4.0a0 - python_abi 3.13.* *_cp313 - readline >=8.2,<9.0a0 - tk >=8.6.13,<8.7.0a0 - tzdata license: Python-2.0 purls: [] size: 33268245 timestamp: 1744665022734 python_site_packages_path: lib/python3.13/site-packages- pypi: https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl name: python-dateutil version: 2.9.0.post0 sha256: a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 requires_dist: - six>=1.5 requires_python: '>=2.7,!=3.0.*,!=3.1.*,!=3.2.*'- pypi: https://files.pythonhosted.org/packages/1e/18/98a99ad95133c6a6e2005fe89faedf294a748bd5dc803008059409ac9b1e/python_dotenv-1.1.0-py3-none-any.whl name: python-dotenv version: 1.1.0 sha256: d7c01d9e2293916c18baf562d95698754b0dbbb5e74d457c45d4f6561fb9d55d requires_dist: - click>=5.0 ; extra == 'cli' requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/45/58/38b5afbc1a800eeea951b9285d3912613f2603bdf897a4ab0f4bd7f405fc/python_multipart-0.0.20-py3-none-any.whl name: python-multipart version: 0.0.20 sha256: 8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104 requires_python: '>=3.8'- conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.13-7_cp313.conda build_number: 7 sha256: 0595134584589064f56e67d3de1d8fcbb673a972946bce25fb593fb092fdcd97 md5: e84b44e6300f1703cb25d29120c5b1d8 constrains: - python 3.13.* *_cp313 license: BSD-3-Clause license_family: BSD purls: [] size: 6988 timestamp: 1745258852285- pypi: https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl name: pytz version: '2025.2' sha256: 5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00- pypi: https://files.pythonhosted.org/packages/04/24/b7721e4845c2f162d26f50521b825fb061bc0a5afcf9a386840f23ea19fa/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: pyyaml version: 6.0.2 sha256: 70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5 requires_python: '>=3.8'- conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8c095d6_2.conda sha256: 2d6d0c026902561ed77cd646b5021aef2d4db22e57a5b0178dfc669231e06d2c md5: 283b96675859b20a825f8fa30f311446 depends: - libgcc >=13 - ncurses >=6.5,<7.0a0 license: GPL-3.0-only license_family: GPL purls: [] size: 282480 timestamp: 1740379431762- pypi: https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl name: requests version: 2.32.3 sha256: 70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6 requires_dist: - charset-normalizer>=2,<4 - idna>=2.5,<4 - urllib3>=1.21.1,<3 - certifi>=2017.4.17 - pysocks>=1.5.6,!=1.5.7 ; extra == 'socks' - chardet>=3.0.2,<6 ; extra == 'use-chardet-on-py3' requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/0d/9b/63f4c7ebc259242c89b3acafdb37b41d1185c07ff0011164674e9076b491/rich-14.0.0-py3-none-any.whl name: rich version: 14.0.0 sha256: 1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0 requires_dist: - ipywidgets>=7.5.1,<9 ; extra == 'jupyter' - markdown-it-py>=2.2.0 - pygments>=2.13.0,<3.0.0 - typing-extensions>=4.0.0,<5.0 ; python_full_version < '3.11' requires_python: '>=3.8.0'- pypi: https://files.pythonhosted.org/packages/0e/2c/1e364cc92970075d7d04c69c928430b23e43a433f044474f57e425cbed37/ruff-0.11.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: ruff version: 0.11.7 sha256: 7940665e74e7b65d427b82bffc1e46710ec7f30d58b4b2d5016e3f0321436502 requires_python: '>=3.7'- pypi: https://files.pythonhosted.org/packages/4d/c0/1108ad9f01567f66b3154063605b350b69c3c9366732e09e45f9fd0d1deb/safehttpx-0.1.6-py3-none-any.whl name: safehttpx version: 0.1.6 sha256: 407cff0b410b071623087c63dd2080c3b44dc076888d8c5823c00d1e58cb381c requires_dist: - httpx - pytest ; extra == 'dev' requires_python: '>3.9'- pypi: https://files.pythonhosted.org/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl name: semantic-version version: 2.10.0 sha256: de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177 requires_dist: - django>=1.11 ; extra == 'dev' - nose2 ; extra == 'dev' - tox ; extra == 'dev' - check-manifest ; extra == 'dev' - coverage ; extra == 'dev' - flake8 ; extra == 'dev' - wheel ; extra == 'dev' - zest-releaser[recommended] ; extra == 'dev' - readme-renderer<25.0 ; python_full_version == '3.4.*' and extra == 'dev' - colorama<=0.4.1 ; python_full_version == '3.4.*' and extra == 'dev' - sphinx ; extra == 'doc' - sphinx-rtd-theme ; extra == 'doc' requires_python: '>=2.7'- pypi: https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl name: shellingham version: 1.5.4 sha256: 7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686 requires_python: '>=3.7'- pypi: https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl name: six version: 1.17.0 sha256: 4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 requires_python: '>=2.7,!=3.0.*,!=3.1.*,!=3.2.*'- pypi: https://files.pythonhosted.org/packages/2f/ce/dedad549d2b37e73d14c56aef25bd42a5f87fdb8e97bf2a78cac5aac8287/smolagents-1.14.0-py3-none-any.whl name: smolagents version: 1.14.0 sha256: 3444a5231bf395ea8c8cc39905aaa17e9ef434b7f4a03bde91b83ea08dd0a856 requires_dist: - huggingface-hub>=0.28.0 - requests>=2.32.3 - rich>=13.9.4 - jinja2>=3.1.4 - pillow>=11.0.0 - markdownify>=0.14.1 - duckduckgo-search>=6.3.7 - python-dotenv - boto3>=1.36.18 ; extra == 'bedrock' - torch ; extra == 'torch' - torchvision ; extra == 'torch' - numpy>=1.21.2 ; extra == 'torch' - soundfile ; extra == 'audio' - smolagents[torch] ; extra == 'audio' - docker>=7.1.0 ; extra == 'docker' - websocket-client ; extra == 'docker' - e2b-code-interpreter>=1.0.3 ; extra == 'e2b' - python-dotenv>=1.0.1 ; extra == 'e2b' - gradio>=5.13.2 ; extra == 'gradio' - litellm>=1.60.2 ; extra == 'litellm' - mcpadapt>=0.0.19 ; extra == 'mcp' - mcp ; extra == 'mcp' - mlx-lm ; extra == 'mlx-lm' - openai>=1.58.1 ; extra == 'openai' - arize-phoenix ; extra == 'telemetry' - opentelemetry-sdk ; extra == 'telemetry' - opentelemetry-exporter-otlp ; extra == 'telemetry' - openinference-instrumentation-smolagents>=0.1.4 ; extra == 'telemetry' - accelerate ; extra == 'transformers' - transformers>=4.0.0 ; extra == 'transformers' - smolagents[torch] ; extra == 'transformers' - helium ; extra == 'vision' - selenium ; extra == 'vision' - vllm ; extra == 'vllm' - torch ; extra == 'vllm' - smolagents[audio,bedrock,docker,e2b,gradio,litellm,mcp,mlx-lm,openai,telemetry,transformers,vision] ; extra == 'all' - ruff>=0.9.0 ; extra == 'quality' - ipython>=8.31.0 ; extra == 'test' - pandas>=2.2.3 ; extra == 'test' - pytest>=8.1.0 ; extra == 'test' - pytest-datadir ; extra == 'test' - python-dotenv>=1.0.1 ; extra == 'test' - smolagents[all] ; extra == 'test' - rank-bm25 ; extra == 'test' - wikipedia-api>=0.8.1 ; extra == 'test' - smolagents[quality,test] ; extra == 'dev' - sqlalchemy ; extra == 'dev' requires_python: '>=3.10'- pypi: https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl name: sniffio version: 1.3.1 sha256: 2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 requires_python: '>=3.7'- pypi: https://files.pythonhosted.org/packages/e7/9c/0e6afc12c269578be5c0c1c9f4b49a8d32770a080260c333ac04cc1c832d/soupsieve-2.7-py3-none-any.whl name: soupsieve version: '2.7' sha256: 6e60cc5c1ffaf1cebcc12e8188320b72071e922c2e897f737cadce79ad5d30c4 requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/8b/0c/9d30a4ebeb6db2b25a841afbb80f6ef9a854fc3b41be131d249a977b4959/starlette-0.46.2-py3-none-any.whl name: starlette version: 0.46.2 sha256: 595633ce89f8ffa71a015caed34a5b2dc1c0cdb3f0f1fbd1e69339cf2abeec35 requires_dist: - anyio>=3.6.2,<5 - typing-extensions>=3.10.0 ; python_full_version < '3.10' - httpx>=0.27.0,<0.29.0 ; extra == 'full' - itsdangerous ; extra == 'full' - jinja2 ; extra == 'full' - python-multipart>=0.0.18 ; extra == 'full' - pyyaml ; extra == 'full' requires_python: '>=3.9'- conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda sha256: e0569c9caa68bf476bead1bed3d79650bb080b532c64a4af7d8ca286c08dea4e md5: d453b98d9c83e71da0741bb0ff4d76bc depends: - libgcc-ng >=12 - libzlib >=1.2.13,<2.0.0a0 license: TCL license_family: BSD purls: [] size: 3318875 timestamp: 1699202167581- pypi: https://files.pythonhosted.org/packages/f9/b6/a447b5e4ec71e13871be01ba81f5dfc9d0af7e473da256ff46bc0e24026f/tomlkit-0.13.2-py3-none-any.whl name: tomlkit version: 0.13.2 sha256: 7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl name: tqdm version: 4.67.1 sha256: 26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2 requires_dist: - colorama ; sys_platform == 'win32' - pytest>=6 ; extra == 'dev' - pytest-cov ; extra == 'dev' - pytest-timeout ; extra == 'dev' - pytest-asyncio>=0.24 ; extra == 'dev' - nbval ; extra == 'dev' - requests ; extra == 'discord' - slack-sdk ; extra == 'slack' - requests ; extra == 'telegram' - ipywidgets>=6 ; extra == 'notebook' requires_python: '>=3.7'- pypi: https://files.pythonhosted.org/packages/48/20/9d953de6f4367163d23ec823200eb3ecb0050a2609691e512c8b95827a9b/typer-0.15.3-py3-none-any.whl name: typer version: 0.15.3 sha256: c86a65ad77ca531f03de08d1b9cb67cd09ad02ddddf4b34745b5008f43b239bd requires_dist: - click>=8.0.0 - typing-extensions>=3.7.4.3 - shellingham>=1.3.0 - rich>=10.11.0 requires_python: '>=3.7'- pypi: https://files.pythonhosted.org/packages/8b/54/b1ae86c0973cc6f0210b53d508ca3641fb6d0c56823f288d108bc7ab3cc8/typing_extensions-4.13.2-py3-none-any.whl name: typing-extensions version: 4.13.2 sha256: a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c requires_python: '>=3.8'- pypi: https://files.pythonhosted.org/packages/31/08/aa4fdfb71f7de5176385bd9e90852eaf6b5d622735020ad600f2bab54385/typing_inspection-0.4.0-py3-none-any.whl name: typing-inspection version: 0.4.0 sha256: 50e72559fcd2a6367a19f7a7e610e6afcb9fac940c650290eed893d61386832f requires_dist: - typing-extensions>=4.12.0 requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/5c/23/c7abc0ca0a1526a0774eca151daeb8de62ec457e77262b66b359c3c7679e/tzdata-2025.2-py2.py3-none-any.whl name: tzdata version: '2025.2' sha256: 1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8 requires_python: '>=2'- conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda sha256: 5aaa366385d716557e365f0a4e9c3fca43ba196872abbbe3d56bb610d131e192 md5: 4222072737ccff51314b5ece9c7d6f5a license: LicenseRef-Public-Domain purls: [] size: 122968 timestamp: 1742727099393- pypi: https://files.pythonhosted.org/packages/6b/11/cc635220681e93a0183390e26485430ca2c7b5f9d33b15c74c2861cb8091/urllib3-2.4.0-py3-none-any.whl name: urllib3 version: 2.4.0 sha256: 4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813 requires_dist: - brotli>=1.0.9 ; platform_python_implementation == 'CPython' and extra == 'brotli' - brotlicffi>=0.8.0 ; platform_python_implementation != 'CPython' and extra == 'brotli' - h2>=4,<5 ; extra == 'h2' - pysocks>=1.5.6,!=1.5.7,<2.0 ; extra == 'socks' - zstandard>=0.18.0 ; extra == 'zstd' requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/b1/4b/4cef6ce21a2aaca9d852a6e84ef4f135d99fcd74fa75105e2fc0c8308acd/uvicorn-0.34.2-py3-none-any.whl name: uvicorn version: 0.34.2 sha256: deb49af569084536d269fe0a6d67e3754f104cf03aba7c11c40f01aadf33c403 requires_dist: - click>=7.0 - h11>=0.8 - typing-extensions>=4.0 ; python_full_version < '3.11' - colorama>=0.4 ; sys_platform == 'win32' and extra == 'standard' - httptools>=0.6.3 ; extra == 'standard' - python-dotenv>=0.13 ; extra == 'standard' - pyyaml>=5.1 ; extra == 'standard' - uvloop>=0.14.0,!=0.15.0,!=0.15.1 ; platform_python_implementation != 'PyPy' and sys_platform != 'cygwin' and sys_platform != 'win32' and extra == 'standard' - watchfiles>=0.13 ; extra == 'standard' - websockets>=10.4 ; extra == 'standard' requires_python: '>=3.9'- pypi: https://files.pythonhosted.org/packages/ff/b2/83a6ddf56cdcbad4e3d841fcc55d6ba7d19aeb89c50f24dd7e859ec0805f/websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: websockets version: 15.0.1 sha256: 0f3c1e2ab208db911594ae5b4f79addeb3501604a165019dd221c0bdcabe4db8 requires_python: '>=3.9'123456789101112131415161718192021222324252627282930313233343536373839404142434445import mathimport osimport re
from bs4 import BeautifulSoupimport httpxfrom smolagents import CodeAgentfrom tools import search_toolfrom gemini_model import GeminiApiModel
class SmolAgent: """ A simple agent using the custom GeminiApiModel. Replace the __call__ method with your actual agent logic using Hugging Face libraries (e.g., smolagents, transformers, inference API). """
def __init__(self): model = GeminiApiModel(model_id="gemini-2.0-flash") self.agent = CodeAgent( tools=[search_tool], model=model, max_steps=5, verbosity_level=0, additional_authorized_imports=["httpx", "math", "os", "re", "bs4"], ) print("SmolAgent initialized with GeminiApiModel.") # Initialize any required components here # e.g., load a model, tokenizer, setup API clients
def __call__(self, question: str) -> str: """ Processes the input question and returns an answer. This is where the core agent logic should reside. """ print(f"SmolAgent received question (first 50 chars): {question[:50]}...")
# --- Agent Logic --- # The CodeAgent will now use GeminiApiModel internally answer = self.agent.run(question) # -------------------------
print(f"SmolAgent returning answer (first 50 chars): {str(answer)[:50]}...") return str(answer)12345678910111213141516171819[project]authors = [{name = "bitcloud2", email = "bitcloud22@gmail.com"}]name = "Final_Assignment_Template"requires-python = ">= 3.11"version = "0.1.0"dependencies = ["smolagents>=1.14.0,<2", "gradio>=5.27.1,<6", "requests>=2.32.3,<3", "httpx>=0.28.1,<0.29", "beautifulsoup4>=4.13.4,<5"]
[build-system]build-backend = "hatchling.build"requires = ["hatchling"]
[tool.pixi.project]channels = ["https://conda.modular.com/max-nightly", "https://conda.modular.com/max", "https://repo.prefix.dev/modular-community", "conda-forge"]platforms = ["linux-64"]
[tool.pixi.pypi-dependencies]final_assignment_template = { path = ".", editable = true }
[tool.pixi.tasks]12gradiorequests1234gradiorequestssmolagentshttpx
1234from smolagents import DuckDuckGoSearchTool
search_tool = DuckDuckGoSearchTool().gitattributes+2
.gitignoreAdded+8
Changelog.mdAdded+34
app.py+54-28
app_dev.pyAdded+280
gemini_model.pyAdded+177
magic.lockAdded+1312
my_agent.pyAdded+45
pyproject.tomlAdded+19
requirements.txt+3-1
src/final_assignment_template/__init__.pyAdded
tools.pyAdded+4