Commit Graph
61 Commits
Author SHA1 Message Date
Tasha Upchurch a79cc6de38 Handle running event loop in LiteLLM prompt handler 2025-09-22 20:20:05 -06:00
Tasha Upchurch e990930363 Merge branch 'main' into codex/update-litellmmodelprovideradv-to-fetch-current-models-md1tqt 2025-09-22 17:35:52 -06:00
Tasha Upchurch 0807ebbad8 Handle OpenAI responses models requiring max_completion_tokens 2025-09-22 17:33:46 -06:00
Tasha Upchurch 23583f0eb7 Improve OpenAI model discovery 2025-09-22 12:02:07 -06:00
TashaSkyUp 7cf82171e5 Make environment management non-polluting and safe
This commit implements a clean architecture where environment variables
are only read, never set, ensuring compatibility with other ComfyUI
packages.

The changes: - Remove all code that sets global environment variables -
Clean up config.yaml to remove API key placeholders - Add documentation
for safe environment handling - Add comprehensive tests to verify
non-polluting behavior - Ensure backward compatibility for other
packages

The commit includes detailed docs explaining the clean architecture and
safety guarantees for package compatibility.
2025-06-25 17:22:53 -06:00
TashaSkyUp 40831eaa28 Add agent node docstrings, improve error handling, and update config
- Add detailed docstrings to AgentNode, BasicRecursionFilterNode, and
DocumentChunkRecursionFilterNode for clarity and documentation. -
Improve input validation and error handling in agent nodes. - Update
.gitignore to cover more environment, config, and IDE files. - Refactor
LiteLLMCustomEndpointProvider for custom API endpoints. - Add
conditional imports and dummy functions for LightRAG when unavailable. -
Update config.yaml to use environment variables for API keys and clarify
usage. - Refine requirements.txt to avoid heavy LightRAG dependencies. -
Add tests/__init__.py with test suite metadata; remove redundant test
files. - Fix CustomDict import and model config handling in
litellmnodes.py. - Improve chunk processing and recursion filter logic
in agent nodes. - Update utils/__init__.py to include env_config.
2025-06-24 17:47:36 -06:00
TashaSkyUp b84323f12d update 2025-06-17 17:52:46 -06:00
TashaSkyUp f434f40e9b Enhance LiteLLMCompletionListOfPrompts to support dual processing modes for prompts and message histories 2025-04-03 18:15:20 -06:00
TashaSkyUp 7c3d09189d Refactor messages input definition to simplify optional handling 2025-04-03 17:56:44 -06:00
TashaSkyUp 0663290028 Refactor LiteLLMCompletionListOfPrompts to enhance message handling and input structure 2025-04-03 17:43:12 -06:00
TashaSkyUp 6c5f450b00 Enhance LiteLLMCompletion to support message history input for prompts 2025-04-03 17:30:48 -06:00
TashaSkyUp 127a96a33f Refactor PDF processing to use PyMuPDF for improved performance and error handling; update LiteLLMCompletion to return messages alongside completions. 2025-04-03 16:54:47 -06:00
TashaSkyUp feca2a205b fix for typo 2025-02-05 15:38:35 -07:00
TashaSkyUp f3c0c1ee7f fix 2025-02-05 15:24:44 -07:00
TashaSkyUp 21e897645d debugging messages for broken agent node. 2025-02-05 15:15:49 -07:00
TashaSkyUp 43ae1a3104 debugging messages for broken agent node. 2025-02-05 15:11:28 -07:00
TashaSkyUp 4350efc607 debugging messages for broken agent node. 2025-02-05 14:54:44 -07:00
TashaSkyUp 25adf1f474 fix for broken inference on non "o" models 2025-02-05 14:00:56 -07:00
TashaSkyUp a05b3933f6 reasoning_effort for o1 o3 2025-02-04 19:53:16 -07:00
TashaSkyUp c8c8821039 better o1 and o3 support 2025-02-04 18:49:03 -07:00
TashaSkyUp 0239c3917c limited o1 and o3 support 2025-02-04 18:38:53 -07:00
TashaSkyUp 041c9bad54 attempt to prevent some litellm spam in the console 2025-01-09 20:15:25 -07:00
TashaSkyUp a9cf8acec3 image completion provider. 2025-01-09 18:51:24 -07:00
TashaSkyUp 754c86e20b image completion provider. 2025-01-09 18:48:44 -07:00
TashaSkyUp 7f3d33e7cd image completion provider. 2025-01-09 18:41:53 -07:00
TashaSkyUp e81f570819 image completion provider. 2025-01-09 18:07:39 -07:00
TashaSkyUp 9c020366d2 adding support for togetherai: meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo 2025-01-09 17:39:33 -07:00
TashaSkyUp 9cf6490047 adding support for togetherai: meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo 2025-01-09 17:31:47 -07:00
TashaSkyUp 6f4ab84bee adding support for togetherai deepseek-v3 2025-01-09 17:18:01 -07:00
TashaSkyUp a487271576 adding chunk recursion filter 2025-01-05 14:34:22 -07:00
TashaSkyUp 2ed779f749 fix for vision in v2 litellm node 2024-11-27 22:05:00 -07:00
TashaSkyUp 1bf860bda2 refactor for consistency with pep 8 naming conventions 2024-11-27 10:25:04 -07:00
TashaSkyUp 5995fdb6eb fixes for caching/saving pydantic models for structured completions. 2024-11-22 11:03:31 -07:00
TashaSkyUp 7b9207eed2 feat: Add response caching for AgentNode
- Implement JSON-based response caching system
- Add use_last_response parameter for cache control
- Move cache directory to data folder
- Remove unused safe_print utilities
- Fix messages_results typo
2024-11-22 09:42:11 -07:00
TashaSkyUp 5b54740591 feat: Add Agent and LightRAG integration nodes
- Add new Agent system with base node infrastructure and recursion filtering
- Implement LightRAG integration with document processing and query capabilities
- Add memory management system with Linux memory directory support
- Update node mappings to include new Agent and LightRAG components
- Fix model response format handling in LiteLLM nodes
- Add new dependencies for embedding and vector storage support
- Remove author attribution from init file
2024-11-20 19:52:32 -07:00
TashaSkyUp 198a6aa5b7 house keeping 2024-11-11 18:25:15 -07:00
tasha-upchurch 9155336eca possible fix for display issue 2024-10-30 20:21:14 -06:00
tasha-upchurch 5c22e4b168 bugfix model kwarg injection 2024-10-29 08:22:15 -06:00
Tasha Upchurch 7f0ab93b03 possible fix for finding uuid based on complex kwargs 2024-10-19 13:01:00 -06:00
Tasha Upchurch 4335e47f76 possible fix for finding uuid based on complex kwargs 2024-10-19 12:20:05 -06:00
Tasha Upchurch ef91ef0770 upgrade for litellmcompletion to handle caching changes to response model 2024-10-19 11:37:41 -06:00
Tasha Upchurch 7d9be96a69 additional bugfix 2024-10-19 11:19:25 -06:00
Tasha Upchurch 88240ed0d6 additional supported types for restricted exec 2024-10-19 11:04:27 -06:00
Tasha Upchurch 6516b094ed fix for AddDataModelToLLM 2024-10-19 10:17:08 -06:00
Tasha Upchurch 03d11eb82c Expand LiteLLM integration and enhance multi-modal capabilities
- Add new classes for advanced LLM interactions (HTMLRenderer, AddDataModelToLLLm, ModifyModelKwargs, LitellmCompletionV2)
- Implement PDF processing with PDFToImageNode for image extraction
- Enhance error handling and caching in LiteLLMCompletion for improved performance
- Update model options and add support for custom data models and kwargs modifications
- Refactor initialization process and simplify JavaScript components
- Improve multi-modal processing with better image handling in LLM completions
- Update project metadata to reflect evolving focus and capabilities

This commit significantly expands the system's ability to handle complex AI tasks,
including HTML rendering, PDF processing, and more flexible LLM interactions.
It represents a major step towards a more comprehensive, multi-modal AI toolkit
2024-09-24 10:32:28 -06:00
Tasha Upchurch b52da5a267 feat: enhance LiteLLM functionality and update README
- Added safe_print and safe_error functions for improved error handling in install.py and litellmnodes.py.
- Introduced new model support in litellmnodes.py including Claude 3.5 Sonnet.
- Refactored LiteLLMCompletion node to improve readability and maintainability.
- Enhanced README.md with updated features, supported models, and usage instructions.
- Included new nodes in README.md for better user guidance.
2024-06-29 13:08:00 -06:00
Tasha Upchurch 7621f83568 feat: add Unicode delimiter handling and validation in message processing
- Introduced a unique Unicode delimiter (Fullwidth Colon, U+FF1A) in the `handler` method of the `ExtractMessages` class to prevent conflicts with regular colons.
- Added validation to ensure that message content does not contain the unique delimiter.
- Refactored `handler` method in `ExtractMessages` to use regex for parsing and validating messages using the new delimiter.
- Improved error handling to raise detailed exceptions for invalid or empty content.
2024-06-14 09:45:43 -06:00
Tasha Upchurch fb758257a2 feat: add MessagesToText and TextToMessages classes for converting messages to text and vice versa
- Introduced the `MessagesToText` class which converts `LLLM_MESSAGES` to a single string.
- Added the `TextToMessages` class to convert a string to a list of messages.
- Both classes come with input types and handlers to facilitate the conversion process.
- Included validation to ensure correct message format and non-empty content.
2024-06-14 09:10:26 -06:00
Tasha Upchurch a4d03c3115 ```
feat: add index tracking to LLM prompt processing

- Introduce `wrapped_llm_call` method to encapsulate LLM call and return index with results.
- Modify `async_process_prompt` to utilize `wrapped_llm_call` and return index with completion.
- Ensure order of completions is maintained using index in `process_prompts`.
```
2024-06-13 21:07:55 -06:00
Tasha Upchurch 67771d6164 fix for bugs introduced earlier 2024-06-13 20:04:08 -06:00