Extracted article handling and text evaluation functions to a new `extractor` module to enhance separation of concerns. Updated the search logic to incorporate result picking using LLM and adjusted the `Answer` function to return structured responses, ensuring better maintainability and extensibility.
Introduces the OnFunctionFinished callback to process function results, errors, and context from OnNewFunction. Updates OnNewFunction to return a result and modifies function calls to include argument handling and post-execution callbacks. Enhances the "answer" function with a new "sources" parameter to provide source tracking for answers.
Reorganized search logic into a dedicated `search.go` file for better modularity. Removed the 'think' functionality and related options (`MaxThinks`) to simplify the codebase. Enhanced the search function and updated tool functions to reflect the streamlined approach.
Updated the `Answer` method to better handle multi-step questions and manage retries. Introduced detailed step breakdowns and streamlined the function's structure for clarity and maintainability. Enhanced the default prompt for improved instruction clarity.
Introduced `SystemPrompt` and `ExtraSystemPrompts` to allow more flexible and context-aware system message customization. Replaced static default system message with dynamic handling using these new fields, falling back to `DefaultPrompt` if needed. Updated the request construction logic to incorporate the newly added prompt options.
Renamed the Go module to align with the updated repository path for better clarity and organization. This ensures consistency across the project and prevents potential import conflicts.
Renamed the Go module to align with the updated repository path for better clarity and organization. This ensures consistency across the project and prevents potential import conflicts.
Introduced DuckDuckGo as a new search provider alongside Google. Implemented a flexible caching system with in-memory, file-based, and no-op cache options to improve modularity. Updated dependencies and revised the project structure for improved maintainability.
Modify `FunctionCall` struct to handle arguments as strings. Add debugging logs to facilitate error tracing and improve JSON unmarshalling in various functions.