Spaces:
Sleeping
Sleeping
Commit History
-
Refactor tools to return structured data and enable agent-driven formatting
Wei Ren- Changed all Meta Ads tools to return structured data (lists of dicts) instead of pre-formatted strings - Updated output_type from "string" to "any" for all 5 tools (GetAdAccountsTool, GetCampaignsTool, GetAdSetsTool, GetAdsTool, GetAdInsightsTool) - Removed format_as_itemized_list() function and all its usages - Updated CodeAgent instructions to format structured data into user-friendly markdown (tables, bullet lists) - Enhanced system message to inform agent about structured data handling capabilities - Added example query demonstrating data filtering: "List my ad accounts and tell me which ones are active" Benefits: - Agent can now filter, sort, and analyze data programmatically - More flexible and contextual response generation - Better support for analytical queries - Cleaner separation between data retrieval and presentation4b85f1d
-
Format tool outputs as itemized lists instead of raw JSON
Wei Ren- Add format_as_itemized_list() helper function - Update all 5 tools to use formatted output - Each item displays with clear structure: --- Item N --- * field: value * field: value - Much more readable than raw JSON dictionaries - Improves user experience with cleaner output07fa31e -
Fix: Remove invalid additional_prompting parameter
Wei Ren- CodeAgent doesn't support additional_prompting parameter - Instead, prepend optimization instructions to user message - Instructs agent to execute code immediately without explanation - Achieves same goal of skipping preliminary stepf6e10f4 -
Optimize agent to skip preliminary explanation step
Wei Ren- Add additional_prompting to instruct agent to execute code immediately - Remove system_message concatenation that was confusing the agent - Agent now directly executes tools without Step 1 explanation - Reduces unnecessary token usage and improves response time04e5a83 -
Fix: Mark date_preset as nullable in GetAdInsightsTool
Wei Ren- Add 'nullable': True to date_preset input definition - Resolves error when tool has optional parameter with default value - Allows agent to call get_ad_insights without date_preset argument9a36200 -
Fix examples format for ChatInterface with additional inputs
Wei Ren- Change examples from list of strings to list of lists - Required when using additional_inputs in gr.ChatInterface - Each example is now wrapped in a list: ['message']d3d49f1 -
Switch model from gpt-5-mini to gpt-4o
Wei Ren- Update LiteLLMModel to use gpt-4o for better code generation - gpt-4o provides superior reasoning and tool selection capabilities - Better suited for CodeAgent's multi-step operations - Update README to reflect model change3417789 -
Implement Code Agent with smolagents and Meta Ads tools
Wei Ren- Create custom tools for Meta Ads operations using Facebook Business SDK - GetAdAccountsTool: Retrieve all accessible ad accounts - GetCampaignsTool: Get campaigns for an ad account - GetAdSetsTool: Get ad sets for a campaign - GetAdsTool: Get ads for an ad set - GetAdInsightsTool: Get performance insights - Integrate smolagents framework with CodeAgent - Use LiteLLMModel with gpt-5-mini - Configure agent with custom Meta Ads tools - Update Gradio chat interface - Add title and description - Include example queries - Update system message for Meta Ads context - Update dependencies - Add smolagents, facebook-business, litellm - Update README with comprehensive documentation - Feature overview - Tool descriptions - Setup instructions - Example queries - Add .gitignore for Python projects6db4648 -
Fix: Remove temperature and top_p parameters for gpt-5-mini
Wei Rengpt-5-mini only supports default temperature (1) and does not allow custom temperature or top_p values. Removed these parameters from the API call and UI.1e7d95c -
Fix: Use max_completion_tokens instead of max_tokens for gpt-5-mini
Wei RenThe gpt-5-mini model requires max_completion_tokens parameter instead of max_tokensfc5eda1 -
Migrate to OpenAI API with gpt-5-mini model
Wei Ren- Replace HuggingFace InferenceClient with OpenAI client - Load API key from OPENAI_API_KEY Space secret - Update model to gpt-5-mini - Remove OAuth authentication - Add error handling for API calls - Add requirements.txt with openai and gradio dependencies76dbf6e
-
initial commit
Verified signature16ea055 -
Duplicate from gradio-templates/chatbot
Verified signatureCo-authored-by: Pete <pngwn@users.noreply.huggingface.co>6924c65