raven/pyproject.toml

48 lines
1.0 KiB
TOML
Raw Permalink Normal View History

2023-09-07 16:38:29 +05:30
[project]
name = "raven"
authors = [
2026-09-01 14:19:03 +05:30
{ name = "Frappe", email = "support@frappe.io"}
2023-09-07 16:38:29 +05:30
]
description = "Simple, open source messaging tool"
requires-python = ">=3.10"
readme = "README.md"
dynamic = ["version"]
dependencies = [
2024-08-28 20:23:49 +05:30
"linkpreview~=0.9.0",
"openai>=2.30.0",
feat: Implement OpenAI Agents SDK with Local LLM Support (#1717) * feat: implement OpenAI Agents SDK with local LLM support ## Major Changes ### OpenAI Agents SDK Integration - Migrate from OpenAI Assistants API to Agents SDK (v0.0.16+) - Add support for local LLMs (LM Studio, Ollama, LocalAI) - Implement hybrid architecture supporting both legacy Assistants and new Agents - Add model provider selection in bot configuration ### File Analysis Enhancement - Implement Excel/CSV file analysis without Code Interpreter requirement - Add MarkItDown library integration for document-to-markdown conversion - Fallback to pandas for spreadsheet conversion when MarkItDown unavailable - Enable direct LLM analysis of uploaded files ### Function Calling Implementation - Full support for Raven AI Functions with SDK - Auto-load bot-specific functions from Raven Bot Functions - Fix JSON serialization for datetime objects - Improve function descriptions for better LLM understanding ### Code Cleanup - Remove debug logging and unnecessary frappe.log_error calls - Clean up unused SDK implementation files (handler_agents.py, sdk_agents.py, sdk_handler.py) - Remove debug files (debug_agents.py, debug_thread.py) - Remove private URL references ### Frontend Updates - Create unified AI Settings page for OpenAI and Local LLM configuration - Add model provider selection in bot form - Hide OpenAI-specific features for Local LLM bots - Add connection testing for Local LLM endpoints ## Technical Details - Direct import from `agents` module (not `openai_agents`) - Maintain conversation context across messages - Support file search with OpenAI vector stores - Async/sync pattern for Frappe compatibility ## Files Modified - Backend: ai.py, agents_integration.py, conversation_file_handler.py, response_formatter.py - Frontend: AISettings.tsx, AIFeaturesBotFormEnhanced.tsx, App.tsx - DocTypes: Raven Settings, Raven Bot - Removed: 5 unused files, 2 debug files * Remove frappe.log_error * Update requirements.txt * remove frappe.log_error and fix bug description tools * fix vector store IDs * fix: apply pre-commit hooks and fix code quality issues - Fixed flake8 errors: - Removed unnecessary f-string prefixes (F541) - Replaced bare except with specific exceptions (E722) - Applied black formatting to Python files - Fixed import ordering with isort - Modernized Python syntax with pyupgrade - Removed trailing whitespace from shell scripts All pre-commit hooks now pass successfully. * fix: add translation wrapper for user-facing error messages - Wrapped all frappe.throw() messages with _() for internationalization - Fixes frappe-semgrep-rules.rules.frappe-missing-translate-function-python violations - All user-facing text is now translatable as per Frappe standards * fix: add missing dependencies to pyproject.toml - Added openai-agents>=0.0.16 - Added markitdown - Added pandas These dependencies are required for the AI features and were missing from pyproject.toml, causing import errors during Frappe app installation. * feat: add migration patch for AI bots model provider - Sets model_provider to 'OpenAI' for all existing AI bots - Enables enable_openai_services if AI integration is already enabled - Handles cases where fields might not exist (backward compatibility) - Only updates bots where model_provider is not already set - Provides detailed migration logs This ensures smooth upgrade for existing Raven installations using AI features. * fix: use set_single_value for Raven Settings in migration patch - Changed frappe.db.set_value to frappe.db.set_single_value for Raven Settings - Fixes frappe-semgrep-rules.rules.frappe-set-value-semantics violation - Single DocTypes require set_single_value method * fix: add nosemgrep comment for manual commit - Added explanation for why manual commit is required in AI processing - The commit is necessary because AI response is processed asynchronously - Background job needs the message to exist in DB before processing - Fixes frappe-semgrep-rules.rules.frappe-manual-commit violation * chore: simplify patch * chore: remove unused file * fix: only navigate to thread if on the same channel * fix: remove unneccessary props * fix: label in command menu * chore: delete unused code * chore: merge bot form enhanced * fix: colors on sliders * chore: remove unneccesary checks * chore: remove unused imports * fix: check for openai assistant ID for routing * feat: add support for INR * chore: remove unused imports * chore: linting * fix: apply document permissions when fetching docs using agents --------- Co-authored-by: Nikhil Kothari <nik.kothari22@live.com>
2025-06-16 18:46:22 +02:00
"blurhash-python",
"openai-agents>=0.17.2",
feat: Implement OpenAI Agents SDK with Local LLM Support (#1717) * feat: implement OpenAI Agents SDK with local LLM support ## Major Changes ### OpenAI Agents SDK Integration - Migrate from OpenAI Assistants API to Agents SDK (v0.0.16+) - Add support for local LLMs (LM Studio, Ollama, LocalAI) - Implement hybrid architecture supporting both legacy Assistants and new Agents - Add model provider selection in bot configuration ### File Analysis Enhancement - Implement Excel/CSV file analysis without Code Interpreter requirement - Add MarkItDown library integration for document-to-markdown conversion - Fallback to pandas for spreadsheet conversion when MarkItDown unavailable - Enable direct LLM analysis of uploaded files ### Function Calling Implementation - Full support for Raven AI Functions with SDK - Auto-load bot-specific functions from Raven Bot Functions - Fix JSON serialization for datetime objects - Improve function descriptions for better LLM understanding ### Code Cleanup - Remove debug logging and unnecessary frappe.log_error calls - Clean up unused SDK implementation files (handler_agents.py, sdk_agents.py, sdk_handler.py) - Remove debug files (debug_agents.py, debug_thread.py) - Remove private URL references ### Frontend Updates - Create unified AI Settings page for OpenAI and Local LLM configuration - Add model provider selection in bot form - Hide OpenAI-specific features for Local LLM bots - Add connection testing for Local LLM endpoints ## Technical Details - Direct import from `agents` module (not `openai_agents`) - Maintain conversation context across messages - Support file search with OpenAI vector stores - Async/sync pattern for Frappe compatibility ## Files Modified - Backend: ai.py, agents_integration.py, conversation_file_handler.py, response_formatter.py - Frontend: AISettings.tsx, AIFeaturesBotFormEnhanced.tsx, App.tsx - DocTypes: Raven Settings, Raven Bot - Removed: 5 unused files, 2 debug files * Remove frappe.log_error * Update requirements.txt * remove frappe.log_error and fix bug description tools * fix vector store IDs * fix: apply pre-commit hooks and fix code quality issues - Fixed flake8 errors: - Removed unnecessary f-string prefixes (F541) - Replaced bare except with specific exceptions (E722) - Applied black formatting to Python files - Fixed import ordering with isort - Modernized Python syntax with pyupgrade - Removed trailing whitespace from shell scripts All pre-commit hooks now pass successfully. * fix: add translation wrapper for user-facing error messages - Wrapped all frappe.throw() messages with _() for internationalization - Fixes frappe-semgrep-rules.rules.frappe-missing-translate-function-python violations - All user-facing text is now translatable as per Frappe standards * fix: add missing dependencies to pyproject.toml - Added openai-agents>=0.0.16 - Added markitdown - Added pandas These dependencies are required for the AI features and were missing from pyproject.toml, causing import errors during Frappe app installation. * feat: add migration patch for AI bots model provider - Sets model_provider to 'OpenAI' for all existing AI bots - Enables enable_openai_services if AI integration is already enabled - Handles cases where fields might not exist (backward compatibility) - Only updates bots where model_provider is not already set - Provides detailed migration logs This ensures smooth upgrade for existing Raven installations using AI features. * fix: use set_single_value for Raven Settings in migration patch - Changed frappe.db.set_value to frappe.db.set_single_value for Raven Settings - Fixes frappe-semgrep-rules.rules.frappe-set-value-semantics violation - Single DocTypes require set_single_value method * fix: add nosemgrep comment for manual commit - Added explanation for why manual commit is required in AI processing - The commit is necessary because AI response is processed asynchronously - Background job needs the message to exist in DB before processing - Fixes frappe-semgrep-rules.rules.frappe-manual-commit violation * chore: simplify patch * chore: remove unused file * fix: only navigate to thread if on the same channel * fix: remove unneccessary props * fix: label in command menu * chore: delete unused code * chore: merge bot form enhanced * fix: colors on sliders * chore: remove unneccesary checks * chore: remove unused imports * fix: check for openai assistant ID for routing * feat: add support for INR * chore: remove unused imports * chore: linting * fix: apply document permissions when fetching docs using agents --------- Co-authored-by: Nikhil Kothari <nik.kothari22@live.com>
2025-06-16 18:46:22 +02:00
"markitdown",
2025-06-16 18:19:02 -05:00
"pandas",
"google-cloud-documentai"
2024-03-16 21:19:03 +05:30
]
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[tool.black]
line-length = 99
[tool.isort]
line_length = 99
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
indent = "\t"
[tool.bench.frappe-dependencies]
frappe = ">=15.111.0,<=17.0.0-dev"
[tool.bench.assets]
2026-09-18 23:48:49 +05:30
build_dir = "./apps/web"
out_dir = "../../raven/public/raven"
index_html_path = "../../raven/www/raven.html"
[project.urls]
2026-09-01 14:19:03 +05:30
Homepage = "https://frappe.io/products/raven"
Repository = "https://github.com/frappe/raven.git"
"Bug Reports" = "https://github.com/frappe/raven/issues"