SimplerLLM 0.3.2.1__tar.gz → 0.3.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/PKG-INFO +1 -1
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/providers/google_image.py +30 -12
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/wrappers/google_wrapper.py +18 -6
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/reliable.py +30 -8
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_addons.py +32 -8
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM.egg-info/PKG-INFO +1 -1
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/setup.py +1 -1
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/LICENSE +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/README.md +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/base.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/providers/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/providers/image_response_models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/providers/openai_image.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/providers/stability_image.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/wrappers/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/wrappers/openai_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/wrappers/stability_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/embeddings.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/flow/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/flow/flow.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/flow/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/flow/tool_registry.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/base.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/exceptions.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/input_guardrails/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/input_guardrails/pii_detection.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/input_guardrails/prompt_injection.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/input_guardrails/topic_filter.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/output_guardrails/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/output_guardrails/content_safety.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/output_guardrails/format_validator.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/output_guardrails/length_validator.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/output_guardrails/pii_detection.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/guardrails/wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/base.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/wrappers/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/wrappers/anthropic_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/wrappers/cohere_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/wrappers/deepseek_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/wrappers/gemini_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/wrappers/ollama_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/wrappers/openai_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm/wrappers/openrouter_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_brainstorm/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_brainstorm/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_brainstorm/recursive_brainstorm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_clustering/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_clustering/chunk_store.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_clustering/clusterer.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_clustering/flat_clusterer.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_clustering/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_clustering/persistence.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_clustering/tree_builder.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_feedback/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_feedback/feedback_loop.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_feedback/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_judge/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_judge/judge.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_judge/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_provider_router/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_provider_router/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_provider_router/provider_router.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_provider_router/query_classifier.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_providers/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_providers/anthropic_llm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_providers/cohere_llm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_providers/deepseek_llm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_providers/gemini_llm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_providers/llm_response_models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_providers/ollama_llm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_providers/openai_llm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_providers/openrouter_llm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_providers/voyage_llm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_retrieval/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_retrieval/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_retrieval/retriever.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_router/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_router/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/language/llm_router/router.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/prompts/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/prompts/hub/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/prompts/hub/agentic_prompts.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/prompts/hub/prompt_manager.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/prompts/messages_template.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/prompts/prompt_builder.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/apify_api.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/brainstorm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/email_functions.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/file_functions.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/file_loader.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/generic_loader.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/image_helpers.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/json_helpers.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/pandas_func.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/pattern_helpers.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/python_func.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/rapid_api.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/serp.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/text_chunker.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/tools/youtube.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/utils/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/utils/custom_verbose.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/vectors/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/vectors/local_vector_db.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/vectors/qdrant_vector_db.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/vectors/simpler_vector.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/vectors/vector_db.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/vectors/vector_providers.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/dialogue_generator/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/dialogue_generator/audio_merger.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/dialogue_generator/dialogue_generator.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/dialogue_generator/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/live_voice_chat/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/live_voice_chat/audio_player.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/live_voice_chat/audio_recorder.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/live_voice_chat/live_voice_chat.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/live_voice_chat/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/audio_utils.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/base.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/providers/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/providers/elevenlabs_convai.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/providers/openai_realtime.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/providers/realtime_response_models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/realtime_voice_chat.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/wrappers/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/wrappers/elevenlabs_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/realtime_voice/wrappers/openai_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/stt/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/stt/base.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/stt/providers/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/stt/providers/openai_stt.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/stt/providers/stt_response_models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/stt/wrappers/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/stt/wrappers/openai_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/tts/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/tts/base.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/tts/providers/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/tts/providers/elevenlabs_tts.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/tts/providers/openai_tts.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/tts/providers/tts_response_models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/tts/wrappers/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/tts/wrappers/elevenlabs_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/tts/wrappers/openai_wrapper.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_dubbing/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_dubbing/audio_sync.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_dubbing/base.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_dubbing/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_dubbing/video_processor.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_transcription/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_transcription/base.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_transcription/caption_generator.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_transcription/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_transcription/utils/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_transcription/utils/subtitle_formatter.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/video_transcription/utils/video_utils.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/voice_chat/__init__.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/voice_chat/conversation.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/voice_chat/models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/voice/voice_chat/voice_chat.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM.egg-info/SOURCES.txt +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM.egg-info/dependency_links.txt +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM.egg-info/requires.txt +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM.egg-info/top_level.txt +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/setup.cfg +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_agent.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_agent_full.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_cohere.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_cohere_embeddings.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_comprehensive_llm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_embeddings_comprehensive.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_flow_comprehensive.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_llm_brainstorm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_llm_clustering_retrieval.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_llm_feedback.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_llm_judge.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_llm_provider_router.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_nested_models.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_openrouter.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_openrouter_full_response.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_pattern_extraction.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_pattern_helpers.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_production_vector_db.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_pydantic_edge_cases.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_pydantic_edge_cases_llm.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_pydantic_structures.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_qdrant_comprehensive.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_qdrant_connection.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_qdrant_integration_live.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_real_llm_generation.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_router_simple.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_router_youtube_titles.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_unified_vector_interface.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_vision_anthropic.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_vision_openai.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_vision_quick.py +0 -0
- {simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/tests/test_voyage_embeddings.py +0 -0
{simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/providers/google_image.py
RENAMED
|
@@ -75,8 +75,9 @@ def _load_image_data(image_source):
|
|
|
75
75
|
|
|
76
76
|
def generate_image(
|
|
77
77
|
prompt,
|
|
78
|
-
model_name="gemini-2.5-flash-image
|
|
78
|
+
model_name="gemini-2.5-flash-image",
|
|
79
79
|
aspect_ratio="1:1",
|
|
80
|
+
resolution="1K",
|
|
80
81
|
output_format="png",
|
|
81
82
|
output_path=None,
|
|
82
83
|
full_response=False,
|
|
@@ -89,8 +90,9 @@ def generate_image(
|
|
|
89
90
|
|
|
90
91
|
Args:
|
|
91
92
|
prompt: Text description of the desired image
|
|
92
|
-
model_name: Model to use (default: gemini-2.5-flash-image
|
|
93
|
+
model_name: Model to use (default: gemini-2.5-flash-image)
|
|
93
94
|
aspect_ratio: Aspect ratio (1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9)
|
|
95
|
+
resolution: Image resolution - "1K", "2K", or "4K" (default: "1K")
|
|
94
96
|
output_format: Image format (png, jpeg, webp) - for metadata only
|
|
95
97
|
output_path: Optional file path to save image
|
|
96
98
|
full_response: If True, returns ImageGenerationResponse with metadata
|
|
@@ -126,7 +128,7 @@ def generate_image(
|
|
|
126
128
|
client = genai.Client(api_key=api_key)
|
|
127
129
|
|
|
128
130
|
if verbose:
|
|
129
|
-
print(f"[Google Gemini] Generating image with model={model_name}, aspect_ratio={aspect_ratio}")
|
|
131
|
+
print(f"[Google Gemini] Generating image with model={model_name}, aspect_ratio={aspect_ratio}, resolution={resolution}")
|
|
130
132
|
|
|
131
133
|
# Always print which model is being used for verification
|
|
132
134
|
print(f"[Google Gemini API] Using model: {model_name}")
|
|
@@ -175,6 +177,10 @@ def generate_image(
|
|
|
175
177
|
generate_content_config = types.GenerateContentConfig(
|
|
176
178
|
response_modalities=["IMAGE", "TEXT"],
|
|
177
179
|
temperature=1.0,
|
|
180
|
+
image_config=types.ImageConfig(
|
|
181
|
+
aspect_ratio=aspect_ratio,
|
|
182
|
+
image_size=resolution,
|
|
183
|
+
),
|
|
178
184
|
)
|
|
179
185
|
|
|
180
186
|
image_data = None
|
|
@@ -254,7 +260,7 @@ def generate_image(
|
|
|
254
260
|
prompt=prompt,
|
|
255
261
|
revised_prompt=text_description, # Store text description as revised_prompt
|
|
256
262
|
size=aspect_ratio, # Store aspect ratio in size field
|
|
257
|
-
quality=
|
|
263
|
+
quality=resolution, # Store resolution (1K, 2K, 4K)
|
|
258
264
|
style=None, # Gemini doesn't have style presets like Stability
|
|
259
265
|
process_time=process_time,
|
|
260
266
|
provider="GOOGLE_GEMINI",
|
|
@@ -288,8 +294,9 @@ def generate_image(
|
|
|
288
294
|
|
|
289
295
|
async def generate_image_async(
|
|
290
296
|
prompt,
|
|
291
|
-
model_name="gemini-2.5-flash-image
|
|
297
|
+
model_name="gemini-2.5-flash-image",
|
|
292
298
|
aspect_ratio="1:1",
|
|
299
|
+
resolution="1K",
|
|
293
300
|
output_format="png",
|
|
294
301
|
output_path=None,
|
|
295
302
|
full_response=False,
|
|
@@ -302,8 +309,9 @@ async def generate_image_async(
|
|
|
302
309
|
|
|
303
310
|
Args:
|
|
304
311
|
prompt: Text description of the desired image
|
|
305
|
-
model_name: Model to use (default: gemini-2.5-flash-image
|
|
312
|
+
model_name: Model to use (default: gemini-2.5-flash-image)
|
|
306
313
|
aspect_ratio: Aspect ratio (1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9)
|
|
314
|
+
resolution: Image resolution - "1K", "2K", or "4K" (default: "1K")
|
|
307
315
|
output_format: Image format (png, jpeg, webp) - for metadata only
|
|
308
316
|
output_path: Optional file path to save image
|
|
309
317
|
full_response: If True, returns ImageGenerationResponse with metadata
|
|
@@ -330,6 +338,7 @@ async def generate_image_async(
|
|
|
330
338
|
prompt=prompt,
|
|
331
339
|
model_name=model_name,
|
|
332
340
|
aspect_ratio=aspect_ratio,
|
|
341
|
+
resolution=resolution,
|
|
333
342
|
output_format=output_format,
|
|
334
343
|
output_path=output_path,
|
|
335
344
|
full_response=full_response,
|
|
@@ -343,8 +352,9 @@ async def generate_image_async(
|
|
|
343
352
|
def edit_image(
|
|
344
353
|
image_source,
|
|
345
354
|
edit_prompt,
|
|
346
|
-
model_name="gemini-2.5-flash-image
|
|
355
|
+
model_name="gemini-2.5-flash-image",
|
|
347
356
|
aspect_ratio="1:1",
|
|
357
|
+
resolution="1K",
|
|
348
358
|
output_format="png",
|
|
349
359
|
output_path=None,
|
|
350
360
|
full_response=False,
|
|
@@ -360,8 +370,9 @@ def edit_image(
|
|
|
360
370
|
- bytes: Raw image data
|
|
361
371
|
- dict: {'data': bytes, 'mime_type': str}
|
|
362
372
|
edit_prompt: Text instructions for how to edit the image
|
|
363
|
-
model_name: Model to use (default: gemini-2.5-flash-image
|
|
373
|
+
model_name: Model to use (default: gemini-2.5-flash-image)
|
|
364
374
|
aspect_ratio: Aspect ratio (1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9)
|
|
375
|
+
resolution: Image resolution - "1K", "2K", or "4K" (default: "1K")
|
|
365
376
|
output_format: Image format (png, jpeg, webp) - for metadata only
|
|
366
377
|
output_path: Optional file path to save edited image
|
|
367
378
|
full_response: If True, returns ImageGenerationResponse with metadata
|
|
@@ -392,7 +403,7 @@ def edit_image(
|
|
|
392
403
|
client = genai.Client(api_key=api_key)
|
|
393
404
|
|
|
394
405
|
if verbose:
|
|
395
|
-
print(f"[Google Gemini] Editing image with model={model_name}")
|
|
406
|
+
print(f"[Google Gemini] Editing image with model={model_name}, aspect_ratio={aspect_ratio}, resolution={resolution}")
|
|
396
407
|
print(f"[Google Gemini] Edit prompt: {edit_prompt}")
|
|
397
408
|
|
|
398
409
|
# Always print which model is being used for verification
|
|
@@ -429,6 +440,10 @@ def edit_image(
|
|
|
429
440
|
generate_content_config = types.GenerateContentConfig(
|
|
430
441
|
response_modalities=["IMAGE", "TEXT"],
|
|
431
442
|
temperature=0.8, # Lower temperature for editing to maintain consistency
|
|
443
|
+
image_config=types.ImageConfig(
|
|
444
|
+
aspect_ratio=aspect_ratio,
|
|
445
|
+
image_size=resolution,
|
|
446
|
+
),
|
|
432
447
|
)
|
|
433
448
|
|
|
434
449
|
edited_image_data = None
|
|
@@ -508,7 +523,7 @@ def edit_image(
|
|
|
508
523
|
prompt=edit_prompt,
|
|
509
524
|
revised_prompt=text_description, # Store text description as revised_prompt
|
|
510
525
|
size=aspect_ratio, # Store aspect ratio in size field
|
|
511
|
-
quality=
|
|
526
|
+
quality=resolution, # Store resolution (1K, 2K, 4K)
|
|
512
527
|
style=None, # Gemini doesn't have style presets
|
|
513
528
|
process_time=process_time,
|
|
514
529
|
provider="GOOGLE_GEMINI",
|
|
@@ -543,8 +558,9 @@ def edit_image(
|
|
|
543
558
|
async def edit_image_async(
|
|
544
559
|
image_source,
|
|
545
560
|
edit_prompt,
|
|
546
|
-
model_name="gemini-2.5-flash-image
|
|
561
|
+
model_name="gemini-2.5-flash-image",
|
|
547
562
|
aspect_ratio="1:1",
|
|
563
|
+
resolution="1K",
|
|
548
564
|
output_format="png",
|
|
549
565
|
output_path=None,
|
|
550
566
|
full_response=False,
|
|
@@ -560,8 +576,9 @@ async def edit_image_async(
|
|
|
560
576
|
- bytes: Raw image data
|
|
561
577
|
- dict: {'data': bytes, 'mime_type': str}
|
|
562
578
|
edit_prompt: Text instructions for how to edit the image
|
|
563
|
-
model_name: Model to use (default: gemini-2.5-flash-image
|
|
579
|
+
model_name: Model to use (default: gemini-2.5-flash-image)
|
|
564
580
|
aspect_ratio: Aspect ratio (1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9)
|
|
581
|
+
resolution: Image resolution - "1K", "2K", or "4K" (default: "1K")
|
|
565
582
|
output_format: Image format (png, jpeg, webp) - for metadata only
|
|
566
583
|
output_path: Optional file path to save edited image
|
|
567
584
|
full_response: If True, returns ImageGenerationResponse with metadata
|
|
@@ -584,6 +601,7 @@ async def edit_image_async(
|
|
|
584
601
|
edit_prompt=edit_prompt,
|
|
585
602
|
model_name=model_name,
|
|
586
603
|
aspect_ratio=aspect_ratio,
|
|
604
|
+
resolution=resolution,
|
|
587
605
|
output_format=output_format,
|
|
588
606
|
output_path=output_path,
|
|
589
607
|
full_response=full_response,
|
{simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/wrappers/google_wrapper.py
RENAMED
|
@@ -27,6 +27,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
27
27
|
self,
|
|
28
28
|
prompt: str,
|
|
29
29
|
size=ImageSize.SQUARE,
|
|
30
|
+
resolution: str = "1K",
|
|
30
31
|
model: str = None,
|
|
31
32
|
output_format: str = "bytes",
|
|
32
33
|
output_path: str = None,
|
|
@@ -42,8 +43,9 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
42
43
|
size: Image size - can be ImageSize enum (SQUARE, HORIZONTAL, VERTICAL)
|
|
43
44
|
or aspect ratio string (e.g., "16:9", "1:1", "21:9")
|
|
44
45
|
Default: ImageSize.SQUARE
|
|
46
|
+
resolution: Image resolution - "1K", "2K", or "4K" (default: "1K")
|
|
45
47
|
model: Model to use (None = use instance default)
|
|
46
|
-
Default: gemini-2.5-flash-image
|
|
48
|
+
Default: gemini-2.5-flash-image
|
|
47
49
|
output_format: How to return the image (default: "bytes")
|
|
48
50
|
Options: "bytes" (returns image bytes),
|
|
49
51
|
"file" (saves to file, requires output_path)
|
|
@@ -93,7 +95,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
93
95
|
|
|
94
96
|
if self.verbose:
|
|
95
97
|
verbose_print(
|
|
96
|
-
f"Generating image - Model: {model_to_use}, Aspect Ratio: {aspect_ratio}",
|
|
98
|
+
f"Generating image - Model: {model_to_use}, Aspect Ratio: {aspect_ratio}, Resolution: {resolution}",
|
|
97
99
|
"info"
|
|
98
100
|
)
|
|
99
101
|
verbose_print(f"Prompt: {prompt[:100]}...", "debug") if len(prompt) > 100 else verbose_print(f"Prompt: {prompt}", "debug")
|
|
@@ -116,6 +118,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
116
118
|
"prompt": prompt,
|
|
117
119
|
"model_name": model_to_use,
|
|
118
120
|
"aspect_ratio": aspect_ratio,
|
|
121
|
+
"resolution": resolution,
|
|
119
122
|
"output_format": "png", # File format (metadata only)
|
|
120
123
|
"output_path": api_output_path,
|
|
121
124
|
"full_response": full_response,
|
|
@@ -150,6 +153,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
150
153
|
self,
|
|
151
154
|
prompt: str,
|
|
152
155
|
size=ImageSize.SQUARE,
|
|
156
|
+
resolution: str = "1K",
|
|
153
157
|
model: str = None,
|
|
154
158
|
output_format: str = "bytes",
|
|
155
159
|
output_path: str = None,
|
|
@@ -165,6 +169,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
165
169
|
size: Image size - can be ImageSize enum (SQUARE, HORIZONTAL, VERTICAL)
|
|
166
170
|
or aspect ratio string (e.g., "16:9", "1:1", "21:9")
|
|
167
171
|
Default: ImageSize.SQUARE
|
|
172
|
+
resolution: Image resolution - "1K", "2K", or "4K" (default: "1K")
|
|
168
173
|
model: Model to use (None = use instance default)
|
|
169
174
|
output_format: How to return the image (default: "bytes")
|
|
170
175
|
output_path: File path to save image (required if output_format="file")
|
|
@@ -204,7 +209,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
204
209
|
|
|
205
210
|
if self.verbose:
|
|
206
211
|
verbose_print(
|
|
207
|
-
f"Generating image (async) - Model: {model_to_use}, Aspect Ratio: {aspect_ratio}",
|
|
212
|
+
f"Generating image (async) - Model: {model_to_use}, Aspect Ratio: {aspect_ratio}, Resolution: {resolution}",
|
|
208
213
|
"info"
|
|
209
214
|
)
|
|
210
215
|
verbose_print(f"Prompt: {prompt[:100]}...", "debug") if len(prompt) > 100 else verbose_print(f"Prompt: {prompt}", "debug")
|
|
@@ -225,6 +230,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
225
230
|
"prompt": prompt,
|
|
226
231
|
"model_name": model_to_use,
|
|
227
232
|
"aspect_ratio": aspect_ratio,
|
|
233
|
+
"resolution": resolution,
|
|
228
234
|
"output_format": "png",
|
|
229
235
|
"output_path": api_output_path,
|
|
230
236
|
"full_response": full_response,
|
|
@@ -260,6 +266,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
260
266
|
image_source,
|
|
261
267
|
edit_prompt: str,
|
|
262
268
|
size=ImageSize.SQUARE,
|
|
269
|
+
resolution: str = "1K",
|
|
263
270
|
model: str = None,
|
|
264
271
|
output_format: str = "bytes",
|
|
265
272
|
output_path: str = None,
|
|
@@ -278,8 +285,9 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
278
285
|
size: Image size - can be ImageSize enum (SQUARE, HORIZONTAL, VERTICAL)
|
|
279
286
|
or aspect ratio string (e.g., "16:9", "1:1", "21:9")
|
|
280
287
|
Default: ImageSize.SQUARE
|
|
288
|
+
resolution: Image resolution - "1K", "2K", or "4K" (default: "1K")
|
|
281
289
|
model: Model to use (None = use instance default)
|
|
282
|
-
Default: gemini-2.5-flash-image
|
|
290
|
+
Default: gemini-2.5-flash-image
|
|
283
291
|
output_format: How to return the image (default: "bytes")
|
|
284
292
|
Options: "bytes" (returns image bytes),
|
|
285
293
|
"file" (saves to file, requires output_path)
|
|
@@ -326,7 +334,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
326
334
|
|
|
327
335
|
if self.verbose:
|
|
328
336
|
verbose_print(
|
|
329
|
-
f"Editing image - Model: {model_to_use}, Aspect Ratio: {aspect_ratio}",
|
|
337
|
+
f"Editing image - Model: {model_to_use}, Aspect Ratio: {aspect_ratio}, Resolution: {resolution}",
|
|
330
338
|
"info"
|
|
331
339
|
)
|
|
332
340
|
verbose_print(f"Edit prompt: {edit_prompt[:100]}...", "debug") if len(edit_prompt) > 100 else verbose_print(f"Edit prompt: {edit_prompt}", "debug")
|
|
@@ -348,6 +356,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
348
356
|
"edit_prompt": edit_prompt,
|
|
349
357
|
"model_name": model_to_use,
|
|
350
358
|
"aspect_ratio": aspect_ratio,
|
|
359
|
+
"resolution": resolution,
|
|
351
360
|
"output_format": "png", # File format (metadata only)
|
|
352
361
|
"output_path": api_output_path,
|
|
353
362
|
"full_response": full_response,
|
|
@@ -382,6 +391,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
382
391
|
image_source,
|
|
383
392
|
edit_prompt: str,
|
|
384
393
|
size=ImageSize.SQUARE,
|
|
394
|
+
resolution: str = "1K",
|
|
385
395
|
model: str = None,
|
|
386
396
|
output_format: str = "bytes",
|
|
387
397
|
output_path: str = None,
|
|
@@ -400,6 +410,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
400
410
|
size: Image size - can be ImageSize enum (SQUARE, HORIZONTAL, VERTICAL)
|
|
401
411
|
or aspect ratio string (e.g., "16:9", "1:1", "21:9")
|
|
402
412
|
Default: ImageSize.SQUARE
|
|
413
|
+
resolution: Image resolution - "1K", "2K", or "4K" (default: "1K")
|
|
403
414
|
model: Model to use (None = use instance default)
|
|
404
415
|
output_format: How to return the image (default: "bytes")
|
|
405
416
|
output_path: File path to save edited image (required if output_format="file")
|
|
@@ -437,7 +448,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
437
448
|
|
|
438
449
|
if self.verbose:
|
|
439
450
|
verbose_print(
|
|
440
|
-
f"Editing image (async) - Model: {model_to_use}, Aspect Ratio: {aspect_ratio}",
|
|
451
|
+
f"Editing image (async) - Model: {model_to_use}, Aspect Ratio: {aspect_ratio}, Resolution: {resolution}",
|
|
441
452
|
"info"
|
|
442
453
|
)
|
|
443
454
|
verbose_print(f"Edit prompt: {edit_prompt[:100]}...", "debug") if len(edit_prompt) > 100 else verbose_print(f"Edit prompt: {edit_prompt}", "debug")
|
|
@@ -459,6 +470,7 @@ class GoogleImageGenerator(ImageGenerator):
|
|
|
459
470
|
"edit_prompt": edit_prompt,
|
|
460
471
|
"model_name": model_to_use,
|
|
461
472
|
"aspect_ratio": aspect_ratio,
|
|
473
|
+
"resolution": resolution,
|
|
462
474
|
"output_format": "png",
|
|
463
475
|
"output_path": api_output_path,
|
|
464
476
|
"full_response": full_response,
|
|
@@ -91,10 +91,12 @@ class ReliableLLM:
|
|
|
91
91
|
full_response: bool = False,
|
|
92
92
|
return_provider: bool = False,
|
|
93
93
|
json_mode=False,
|
|
94
|
+
images: list = None,
|
|
95
|
+
detail: str = "auto",
|
|
94
96
|
) -> Union[str, LLMFullResponse, Tuple[Union[str, LLMFullResponse], LLMProvider, str]]:
|
|
95
97
|
"""
|
|
96
98
|
Generate a response using the primary LLM, falling back to secondary if primary fails.
|
|
97
|
-
|
|
99
|
+
|
|
98
100
|
Args:
|
|
99
101
|
model_name (str, optional): The name of the model to use.
|
|
100
102
|
prompt (str, optional): A single prompt string to generate a response for.
|
|
@@ -105,12 +107,15 @@ class ReliableLLM:
|
|
|
105
107
|
top_p (float, optional): Controls diversity of output.
|
|
106
108
|
full_response (bool, optional): If True, returns the full API response.
|
|
107
109
|
return_provider (bool, optional): If True, returns a tuple of (response, provider) where provider is the LLMProvider that generated the response.
|
|
108
|
-
|
|
110
|
+
json_mode (bool, optional): If True, enables JSON mode for structured output.
|
|
111
|
+
images (list, optional): A list of image URLs or file paths for vision tasks.
|
|
112
|
+
detail (str, optional): Level of detail for image analysis ("low", "high", "auto"). OpenAI-specific parameter. Defaults to "auto".
|
|
113
|
+
|
|
109
114
|
Returns:
|
|
110
|
-
Union[str, dict, Tuple[Union[str, dict], LLMProvider, str]]:
|
|
115
|
+
Union[str, dict, Tuple[Union[str, dict], LLMProvider, str]]:
|
|
111
116
|
- If return_provider is False: The generated response from either primary or secondary LLM
|
|
112
117
|
- If return_provider is True: A tuple of (response, provider, model_name) where provider is the LLMProvider that was used and model_name is the name of the model
|
|
113
|
-
|
|
118
|
+
|
|
114
119
|
Raises:
|
|
115
120
|
Exception: If both primary and secondary LLMs fail
|
|
116
121
|
"""
|
|
@@ -128,6 +133,8 @@ class ReliableLLM:
|
|
|
128
133
|
top_p=top_p,
|
|
129
134
|
full_response=full_response,
|
|
130
135
|
json_mode=json_mode,
|
|
136
|
+
images=images,
|
|
137
|
+
detail=detail,
|
|
131
138
|
)
|
|
132
139
|
if self.verbose:
|
|
133
140
|
verbose_print("Primary provider generated response successfully", "info")
|
|
@@ -147,6 +154,8 @@ class ReliableLLM:
|
|
|
147
154
|
top_p=top_p,
|
|
148
155
|
full_response=full_response,
|
|
149
156
|
json_mode=json_mode,
|
|
157
|
+
images=images,
|
|
158
|
+
detail=detail,
|
|
150
159
|
)
|
|
151
160
|
if self.verbose:
|
|
152
161
|
verbose_print("Secondary provider generated response successfully", "info")
|
|
@@ -167,6 +176,8 @@ class ReliableLLM:
|
|
|
167
176
|
top_p=top_p,
|
|
168
177
|
full_response=full_response,
|
|
169
178
|
json_mode=json_mode,
|
|
179
|
+
images=images,
|
|
180
|
+
detail=detail,
|
|
170
181
|
)
|
|
171
182
|
if self.verbose:
|
|
172
183
|
verbose_print("Secondary provider generated response successfully", "info")
|
|
@@ -187,10 +198,12 @@ class ReliableLLM:
|
|
|
187
198
|
full_response: bool = False,
|
|
188
199
|
return_provider: bool = False,
|
|
189
200
|
json_mode: bool = False,
|
|
201
|
+
images: list = None,
|
|
202
|
+
detail: str = "auto",
|
|
190
203
|
) -> Union[str, LLMFullResponse, Tuple[Union[str, LLMFullResponse], LLMProvider, str]]:
|
|
191
204
|
"""
|
|
192
205
|
Asynchronously generate a response using the primary LLM, falling back to secondary if primary fails.
|
|
193
|
-
|
|
206
|
+
|
|
194
207
|
Args:
|
|
195
208
|
model_name (str, optional): The name of the model to use.
|
|
196
209
|
prompt (str, optional): A single prompt string to generate a response for.
|
|
@@ -201,12 +214,15 @@ class ReliableLLM:
|
|
|
201
214
|
top_p (float, optional): Controls diversity of output.
|
|
202
215
|
full_response (bool, optional): If True, returns the full API response.
|
|
203
216
|
return_provider (bool, optional): If True, returns a tuple of (response, provider) where provider is the LLMProvider that generated the response.
|
|
204
|
-
|
|
217
|
+
json_mode (bool, optional): If True, enables JSON mode for structured output.
|
|
218
|
+
images (list, optional): A list of image URLs or file paths for vision tasks.
|
|
219
|
+
detail (str, optional): Level of detail for image analysis ("low", "high", "auto"). OpenAI-specific parameter. Defaults to "auto".
|
|
220
|
+
|
|
205
221
|
Returns:
|
|
206
|
-
Union[str, dict, Tuple[Union[str, dict], LLMProvider, str]]:
|
|
222
|
+
Union[str, dict, Tuple[Union[str, dict], LLMProvider, str]]:
|
|
207
223
|
- If return_provider is False: The generated response from either primary or secondary LLM
|
|
208
224
|
- If return_provider is True: A tuple of (response, provider, model_name) where provider is the LLMProvider that was used and model_name is the name of the model
|
|
209
|
-
|
|
225
|
+
|
|
210
226
|
Raises:
|
|
211
227
|
Exception: If both primary and secondary LLMs fail
|
|
212
228
|
"""
|
|
@@ -224,6 +240,8 @@ class ReliableLLM:
|
|
|
224
240
|
top_p=top_p,
|
|
225
241
|
full_response=full_response,
|
|
226
242
|
json_mode=json_mode,
|
|
243
|
+
images=images,
|
|
244
|
+
detail=detail,
|
|
227
245
|
)
|
|
228
246
|
if self.verbose:
|
|
229
247
|
verbose_print("Primary provider generated response successfully", "info")
|
|
@@ -243,6 +261,8 @@ class ReliableLLM:
|
|
|
243
261
|
top_p=top_p,
|
|
244
262
|
full_response=full_response,
|
|
245
263
|
json_mode=json_mode,
|
|
264
|
+
images=images,
|
|
265
|
+
detail=detail,
|
|
246
266
|
)
|
|
247
267
|
if self.verbose:
|
|
248
268
|
verbose_print("Secondary provider generated response successfully", "info")
|
|
@@ -263,6 +283,8 @@ class ReliableLLM:
|
|
|
263
283
|
top_p=top_p,
|
|
264
284
|
full_response=full_response,
|
|
265
285
|
json_mode=json_mode,
|
|
286
|
+
images=images,
|
|
287
|
+
detail=detail,
|
|
266
288
|
)
|
|
267
289
|
if self.verbose:
|
|
268
290
|
verbose_print("Secondary provider generated response successfully", "info")
|
|
@@ -76,6 +76,8 @@ def generate_pydantic_json_model(
|
|
|
76
76
|
custom_prompt_suffix: str = None,
|
|
77
77
|
system_prompt: str = "The Output is a VALID Structured JSON",
|
|
78
78
|
full_response: bool = False,
|
|
79
|
+
images: list = None,
|
|
80
|
+
detail: str = "auto",
|
|
79
81
|
) -> Union[BaseModel, LLMFullResponse, str]:
|
|
80
82
|
"""
|
|
81
83
|
Generates a model instance based on a given prompt, retrying on validation errors.
|
|
@@ -91,8 +93,10 @@ def generate_pydantic_json_model(
|
|
|
91
93
|
:param custom_prompt_suffix: Optional string to customize or override the generated prompt extension.
|
|
92
94
|
:param system_prompt: System prompt to set the context for the LLM.
|
|
93
95
|
:param full_response: If True, returns the full API response including token counts.
|
|
96
|
+
:param images: A list of image URLs or file paths for vision tasks.
|
|
97
|
+
:param detail: Level of detail for image analysis ("low", "high", "auto"). OpenAI-specific parameter. Defaults to "auto".
|
|
94
98
|
|
|
95
|
-
:return:
|
|
99
|
+
:return:
|
|
96
100
|
- If full_response=False: BaseModel object
|
|
97
101
|
- If full_response=True: LLMFullResponse object with model_object attribute and input_token_count and output_token_count
|
|
98
102
|
- Error message string if unsuccessful
|
|
@@ -110,7 +114,9 @@ def generate_pydantic_json_model(
|
|
|
110
114
|
temperature=temperature,
|
|
111
115
|
top_p=top_p,
|
|
112
116
|
json_mode=True,
|
|
113
|
-
full_response=full_response
|
|
117
|
+
full_response=full_response,
|
|
118
|
+
images=images,
|
|
119
|
+
detail=detail,
|
|
114
120
|
)
|
|
115
121
|
|
|
116
122
|
response_text = ai_response.generated_text if full_response else ai_response
|
|
@@ -162,6 +168,8 @@ def generate_pydantic_json_model_reliable(
|
|
|
162
168
|
custom_prompt_suffix: str = None,
|
|
163
169
|
system_prompt: str = "The Output is a VALID Structured JSON",
|
|
164
170
|
full_response: bool = False,
|
|
171
|
+
images: list = None,
|
|
172
|
+
detail: str = "auto",
|
|
165
173
|
) -> Union[Tuple[BaseModel, LLMProvider, str], LLMFullResponse, str]:
|
|
166
174
|
"""
|
|
167
175
|
Generates a model instance using ReliableLLM with fallback capability.
|
|
@@ -177,8 +185,10 @@ def generate_pydantic_json_model_reliable(
|
|
|
177
185
|
:param custom_prompt_suffix: Optional string to customize or override the generated prompt extension.
|
|
178
186
|
:param system_prompt: System prompt to set the context for the LLM.
|
|
179
187
|
:param full_response: If True, returns the full API response including token counts.
|
|
188
|
+
:param images: A list of image URLs or file paths for vision tasks.
|
|
189
|
+
:param detail: Level of detail for image analysis ("low", "high", "auto"). OpenAI-specific parameter. Defaults to "auto".
|
|
180
190
|
|
|
181
|
-
:return:
|
|
191
|
+
:return:
|
|
182
192
|
- If full_response=False: Tuple of (model_object, provider, model_name)
|
|
183
193
|
- If full_response=True: LLMFullResponse object with model_object, provider, and model_name attributes, and input_token_count and output_token_count
|
|
184
194
|
- Error message string if unsuccessful
|
|
@@ -196,7 +206,9 @@ def generate_pydantic_json_model_reliable(
|
|
|
196
206
|
temperature=temperature,
|
|
197
207
|
top_p=top_p,
|
|
198
208
|
json_mode=True,
|
|
199
|
-
full_response=full_response
|
|
209
|
+
full_response=full_response,
|
|
210
|
+
images=images,
|
|
211
|
+
detail=detail,
|
|
200
212
|
)
|
|
201
213
|
|
|
202
214
|
if full_response:
|
|
@@ -253,6 +265,8 @@ async def generate_pydantic_json_model_reliable_async(
|
|
|
253
265
|
custom_prompt_suffix: str = None,
|
|
254
266
|
system_prompt: str = "The Output is a VALID Structured JSON",
|
|
255
267
|
full_response: bool = False,
|
|
268
|
+
images: list = None,
|
|
269
|
+
detail: str = "auto",
|
|
256
270
|
) -> Union[Tuple[BaseModel, LLMProvider, str], LLMFullResponse, str]:
|
|
257
271
|
"""
|
|
258
272
|
Asynchronously generates a model instance using ReliableLLM with fallback capability.
|
|
@@ -268,8 +282,10 @@ async def generate_pydantic_json_model_reliable_async(
|
|
|
268
282
|
:param custom_prompt_suffix: Optional string to customize or override the generated prompt extension.
|
|
269
283
|
:param system_prompt: System prompt to set the context for the LLM.
|
|
270
284
|
:param full_response: If True, returns the full API response including token counts.
|
|
285
|
+
:param images: A list of image URLs or file paths for vision tasks.
|
|
286
|
+
:param detail: Level of detail for image analysis ("low", "high", "auto"). OpenAI-specific parameter. Defaults to "auto".
|
|
271
287
|
|
|
272
|
-
:return:
|
|
288
|
+
:return:
|
|
273
289
|
- If full_response=False: Tuple of (model_object, provider, model_name)
|
|
274
290
|
- If full_response=True: LLMFullResponse object with model_object, provider, and model_name attributes, and input_token_count and output_token_count
|
|
275
291
|
- Error message string if unsuccessful
|
|
@@ -287,7 +303,9 @@ async def generate_pydantic_json_model_reliable_async(
|
|
|
287
303
|
temperature=temperature,
|
|
288
304
|
top_p=top_p,
|
|
289
305
|
json_mode=True,
|
|
290
|
-
full_response=full_response
|
|
306
|
+
full_response=full_response,
|
|
307
|
+
images=images,
|
|
308
|
+
detail=detail,
|
|
291
309
|
)
|
|
292
310
|
|
|
293
311
|
if full_response:
|
|
@@ -344,6 +362,8 @@ async def generate_pydantic_json_model_async(
|
|
|
344
362
|
custom_prompt_suffix: str = None,
|
|
345
363
|
system_prompt: str = "The Output is a VALID Structured JSON",
|
|
346
364
|
full_response: bool = False,
|
|
365
|
+
images: list = None,
|
|
366
|
+
detail: str = "auto",
|
|
347
367
|
) -> Union[BaseModel, LLMFullResponse, str]:
|
|
348
368
|
"""
|
|
349
369
|
Asynchronously generates a model instance based on a given prompt, retrying on validation errors.
|
|
@@ -359,8 +379,10 @@ async def generate_pydantic_json_model_async(
|
|
|
359
379
|
:param custom_prompt_suffix: Optional string to customize or override the generated prompt extension.
|
|
360
380
|
:param system_prompt: System prompt to set the context for the LLM.
|
|
361
381
|
:param full_response: If True, returns the full API response including token counts.
|
|
382
|
+
:param images: A list of image URLs or file paths for vision tasks.
|
|
383
|
+
:param detail: Level of detail for image analysis ("low", "high", "auto"). OpenAI-specific parameter. Defaults to "auto".
|
|
362
384
|
|
|
363
|
-
:return:
|
|
385
|
+
:return:
|
|
364
386
|
- If full_response=False: BaseModel object
|
|
365
387
|
- If full_response=True: LLMFullResponse object with model_object attribute and input_token_count and output_token_count
|
|
366
388
|
- Error message string if unsuccessful
|
|
@@ -378,7 +400,9 @@ async def generate_pydantic_json_model_async(
|
|
|
378
400
|
temperature=temperature,
|
|
379
401
|
top_p=top_p,
|
|
380
402
|
json_mode=True,
|
|
381
|
-
full_response=full_response
|
|
403
|
+
full_response=full_response,
|
|
404
|
+
images=images,
|
|
405
|
+
detail=detail,
|
|
382
406
|
)
|
|
383
407
|
|
|
384
408
|
response_text = ai_response.generated_text if full_response else ai_response
|
|
@@ -20,7 +20,7 @@ with open("README.md", encoding="utf-8") as f:
|
|
|
20
20
|
|
|
21
21
|
setup(
|
|
22
22
|
name="SimplerLLM",
|
|
23
|
-
version="0.3.2.
|
|
23
|
+
version="0.3.2.3",
|
|
24
24
|
author="Hasan Aboul Hasan",
|
|
25
25
|
author_email="hasan@learnwithhasan.com",
|
|
26
26
|
description="An easy-to-use Library for interacting with language models.",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/providers/openai_image.py
RENAMED
|
File without changes
|
{simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/providers/stability_image.py
RENAMED
|
File without changes
|
|
File without changes
|
{simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/wrappers/openai_wrapper.py
RENAMED
|
File without changes
|
{simplerllm-0.3.2.1 → simplerllm-0.3.2.3}/SimplerLLM/image/generation/wrappers/stability_wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|