langfun 0.1.2.dev202503130804__tar.gz → 0.1.2.dev202503150803__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.
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/PKG-INFO +1 -12
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/gemini.py +10 -1
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/__init__.py +0 -3
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun.egg-info/PKG-INFO +1 -12
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun.egg-info/SOURCES.txt +0 -2
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun.egg-info/requires.txt +0 -13
- langfun-0.1.2.dev202503130804/langfun/core/modalities/ms_office.py +0 -117
- langfun-0.1.2.dev202503130804/langfun/core/modalities/ms_office_test.py +0 -389
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/LICENSE +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/README.md +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/agentic/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/agentic/action.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/agentic/action_eval.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/agentic/action_eval_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/agentic/action_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/correction.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/correction_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/execution.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/execution_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/generation.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/generation_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/parsing.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/parsing_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/sandboxing.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/coding/python/sandboxing_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/component.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/component_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/concurrent.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/concurrent_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/console.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/console_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/base.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/base_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/matching.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/matching_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/patching.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/patching_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/scoring.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/scoring_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/checkpointing.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/checkpointing_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/eval_test_helper.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/evaluation.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/evaluation_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/example.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/example_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/experiment.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/experiment_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/metric_values.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/metric_values_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/metrics.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/metrics_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/progress.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/progress_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/progress_tracking.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/progress_tracking_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/reporting.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/reporting_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/runners.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/eval/v2/runners_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/langfunc.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/langfunc_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/language_model.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/language_model_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/anthropic.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/anthropic_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/azure_openai.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/azure_openai_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/cache/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/cache/base.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/cache/in_memory.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/cache/in_memory_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/compositional.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/compositional_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/deepseek.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/deepseek_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/fake.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/fake_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/gemini_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/google_genai.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/google_genai_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/groq.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/groq_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/llama_cpp.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/llama_cpp_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/openai.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/openai_compatible.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/openai_compatible_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/openai_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/rest.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/rest_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/vertexai.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/llms/vertexai_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/logging.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/logging_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/memories/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/memories/conversation_history.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/memories/conversation_history_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/memory.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/message.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/message_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/audio.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/audio_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/image.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/image_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/mime.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/mime_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/pdf.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/pdf_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/video.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/video_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modality.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modality_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/natural_language.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/natural_language_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/sampling.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/sampling_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/completion.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/completion_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/description.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/description_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/function_generation.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/function_generation_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/mapping.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/mapping_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/parsing.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/parsing_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/querying.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/querying_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/schema.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/schema_generation.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/schema_generation_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/schema_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/scoring.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/scoring_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/tokenization.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/structured/tokenization_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/subscription.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/subscription_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/template.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/template_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/templates/__init__.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/templates/completion.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/templates/completion_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/templates/conversation.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/templates/conversation_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/templates/demonstration.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/templates/demonstration_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/templates/selfplay.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/templates/selfplay_test.py +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun.egg-info/dependency_links.txt +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun.egg-info/top_level.txt +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/setup.cfg +0 -0
- {langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: langfun
|
3
|
-
Version: 0.1.2.
|
3
|
+
Version: 0.1.2.dev202503150803
|
4
4
|
Summary: Langfun: Language as Functions.
|
5
5
|
Home-page: https://github.com/google/langfun
|
6
6
|
Author: Langfun Authors
|
@@ -32,10 +32,7 @@ Requires-Dist: termcolor==1.1.0; extra == "all"
|
|
32
32
|
Requires-Dist: tqdm>=4.64.1; extra == "all"
|
33
33
|
Requires-Dist: google-auth>=2.16.0; extra == "all"
|
34
34
|
Requires-Dist: python-magic>=0.4.27; extra == "all"
|
35
|
-
Requires-Dist: python-docx>=0.8.11; extra == "all"
|
36
35
|
Requires-Dist: pillow>=10.0.0; extra == "all"
|
37
|
-
Requires-Dist: openpyxl>=3.1.0; extra == "all"
|
38
|
-
Requires-Dist: pandas>=2.0.3; extra == "all"
|
39
36
|
Provides-Extra: ui
|
40
37
|
Requires-Dist: termcolor==1.1.0; extra == "ui"
|
41
38
|
Requires-Dist: tqdm>=4.64.1; extra == "ui"
|
@@ -43,19 +40,11 @@ Provides-Extra: vertexai
|
|
43
40
|
Requires-Dist: google-auth>=2.16.0; extra == "vertexai"
|
44
41
|
Provides-Extra: mime
|
45
42
|
Requires-Dist: python-magic>=0.4.27; extra == "mime"
|
46
|
-
Requires-Dist: python-docx>=0.8.11; extra == "mime"
|
47
43
|
Requires-Dist: pillow>=10.0.0; extra == "mime"
|
48
|
-
Requires-Dist: openpyxl>=3.1.0; extra == "mime"
|
49
|
-
Requires-Dist: pandas>=2.0.3; extra == "mime"
|
50
44
|
Provides-Extra: mime-auto
|
51
45
|
Requires-Dist: python-magic>=0.4.27; extra == "mime-auto"
|
52
|
-
Provides-Extra: mime-docx
|
53
|
-
Requires-Dist: python-docx>=0.8.11; extra == "mime-docx"
|
54
46
|
Provides-Extra: mime-pil
|
55
47
|
Requires-Dist: pillow>=10.0.0; extra == "mime-pil"
|
56
|
-
Provides-Extra: mime-xlsx
|
57
|
-
Requires-Dist: openpyxl>=3.1.0; extra == "mime-xlsx"
|
58
|
-
Requires-Dist: pandas>=2.0.3; extra == "mime-xlsx"
|
59
48
|
Dynamic: author
|
60
49
|
Dynamic: author-email
|
61
50
|
Dynamic: classifier
|
@@ -608,7 +608,16 @@ class Gemini(rest.REST):
|
|
608
608
|
modalities = [modalities]
|
609
609
|
for modality in modalities:
|
610
610
|
if modality.is_text:
|
611
|
-
|
611
|
+
# Add YouTube video into the context window.
|
612
|
+
# https://ai.google.dev/gemini-api/docs/vision?lang=python#youtube
|
613
|
+
if modality.mime_type == 'text/html' and modality.uri.startswith(
|
614
|
+
'https://www.youtube.com/watch?v='
|
615
|
+
):
|
616
|
+
parts.append({
|
617
|
+
'fileData': {'mimeType': 'video/*', 'fileUri': modality.uri}
|
618
|
+
})
|
619
|
+
else:
|
620
|
+
parts.append({'text': modality.to_text()})
|
612
621
|
else:
|
613
622
|
parts.append({
|
614
623
|
'inlineData': {
|
{langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun/core/modalities/__init__.py
RENAMED
@@ -20,9 +20,6 @@
|
|
20
20
|
from langfun.core.modalities.audio import Audio
|
21
21
|
from langfun.core.modalities.mime import Mime
|
22
22
|
from langfun.core.modalities.mime import Custom
|
23
|
-
from langfun.core.modalities.ms_office import Docx
|
24
|
-
from langfun.core.modalities.ms_office import Pptx
|
25
|
-
from langfun.core.modalities.ms_office import Xlsx
|
26
23
|
from langfun.core.modalities.image import Image
|
27
24
|
from langfun.core.modalities.pdf import PDF
|
28
25
|
from langfun.core.modalities.video import Video
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: langfun
|
3
|
-
Version: 0.1.2.
|
3
|
+
Version: 0.1.2.dev202503150803
|
4
4
|
Summary: Langfun: Language as Functions.
|
5
5
|
Home-page: https://github.com/google/langfun
|
6
6
|
Author: Langfun Authors
|
@@ -32,10 +32,7 @@ Requires-Dist: termcolor==1.1.0; extra == "all"
|
|
32
32
|
Requires-Dist: tqdm>=4.64.1; extra == "all"
|
33
33
|
Requires-Dist: google-auth>=2.16.0; extra == "all"
|
34
34
|
Requires-Dist: python-magic>=0.4.27; extra == "all"
|
35
|
-
Requires-Dist: python-docx>=0.8.11; extra == "all"
|
36
35
|
Requires-Dist: pillow>=10.0.0; extra == "all"
|
37
|
-
Requires-Dist: openpyxl>=3.1.0; extra == "all"
|
38
|
-
Requires-Dist: pandas>=2.0.3; extra == "all"
|
39
36
|
Provides-Extra: ui
|
40
37
|
Requires-Dist: termcolor==1.1.0; extra == "ui"
|
41
38
|
Requires-Dist: tqdm>=4.64.1; extra == "ui"
|
@@ -43,19 +40,11 @@ Provides-Extra: vertexai
|
|
43
40
|
Requires-Dist: google-auth>=2.16.0; extra == "vertexai"
|
44
41
|
Provides-Extra: mime
|
45
42
|
Requires-Dist: python-magic>=0.4.27; extra == "mime"
|
46
|
-
Requires-Dist: python-docx>=0.8.11; extra == "mime"
|
47
43
|
Requires-Dist: pillow>=10.0.0; extra == "mime"
|
48
|
-
Requires-Dist: openpyxl>=3.1.0; extra == "mime"
|
49
|
-
Requires-Dist: pandas>=2.0.3; extra == "mime"
|
50
44
|
Provides-Extra: mime-auto
|
51
45
|
Requires-Dist: python-magic>=0.4.27; extra == "mime-auto"
|
52
|
-
Provides-Extra: mime-docx
|
53
|
-
Requires-Dist: python-docx>=0.8.11; extra == "mime-docx"
|
54
46
|
Provides-Extra: mime-pil
|
55
47
|
Requires-Dist: pillow>=10.0.0; extra == "mime-pil"
|
56
|
-
Provides-Extra: mime-xlsx
|
57
|
-
Requires-Dist: openpyxl>=3.1.0; extra == "mime-xlsx"
|
58
|
-
Requires-Dist: pandas>=2.0.3; extra == "mime-xlsx"
|
59
48
|
Dynamic: author
|
60
49
|
Dynamic: author-email
|
61
50
|
Dynamic: classifier
|
{langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun.egg-info/SOURCES.txt
RENAMED
@@ -122,8 +122,6 @@ langfun/core/modalities/image.py
|
|
122
122
|
langfun/core/modalities/image_test.py
|
123
123
|
langfun/core/modalities/mime.py
|
124
124
|
langfun/core/modalities/mime_test.py
|
125
|
-
langfun/core/modalities/ms_office.py
|
126
|
-
langfun/core/modalities/ms_office_test.py
|
127
125
|
langfun/core/modalities/pdf.py
|
128
126
|
langfun/core/modalities/pdf_test.py
|
129
127
|
langfun/core/modalities/video.py
|
{langfun-0.1.2.dev202503130804 → langfun-0.1.2.dev202503150803}/langfun.egg-info/requires.txt
RENAMED
@@ -10,31 +10,18 @@ termcolor==1.1.0
|
|
10
10
|
tqdm>=4.64.1
|
11
11
|
google-auth>=2.16.0
|
12
12
|
python-magic>=0.4.27
|
13
|
-
python-docx>=0.8.11
|
14
13
|
pillow>=10.0.0
|
15
|
-
openpyxl>=3.1.0
|
16
|
-
pandas>=2.0.3
|
17
14
|
|
18
15
|
[mime]
|
19
16
|
python-magic>=0.4.27
|
20
|
-
python-docx>=0.8.11
|
21
17
|
pillow>=10.0.0
|
22
|
-
openpyxl>=3.1.0
|
23
|
-
pandas>=2.0.3
|
24
18
|
|
25
19
|
[mime-auto]
|
26
20
|
python-magic>=0.4.27
|
27
21
|
|
28
|
-
[mime-docx]
|
29
|
-
python-docx>=0.8.11
|
30
|
-
|
31
22
|
[mime-pil]
|
32
23
|
pillow>=10.0.0
|
33
24
|
|
34
|
-
[mime-xlsx]
|
35
|
-
openpyxl>=3.1.0
|
36
|
-
pandas>=2.0.3
|
37
|
-
|
38
25
|
[ui]
|
39
26
|
termcolor==1.1.0
|
40
27
|
tqdm>=4.64.1
|
@@ -1,117 +0,0 @@
|
|
1
|
-
# Copyright 2023 The Langfun Authors
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
"""Microsoft Office file types."""
|
15
|
-
|
16
|
-
import base64
|
17
|
-
import io
|
18
|
-
import os
|
19
|
-
from typing import Iterable
|
20
|
-
from langfun.core.modalities import mime
|
21
|
-
from langfun.core.modalities import pdf
|
22
|
-
import requests
|
23
|
-
|
24
|
-
|
25
|
-
class Xlsx(mime.Mime):
|
26
|
-
"""Xlsx file type."""
|
27
|
-
|
28
|
-
MIME_PREFIX = (
|
29
|
-
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
30
|
-
)
|
31
|
-
|
32
|
-
def _raw_html(self) -> str:
|
33
|
-
try:
|
34
|
-
import pandas as pd # pylint: disable=g-import-not-at-top
|
35
|
-
import openpyxl # pylint: disable=g-import-not-at-top, unused-import
|
36
|
-
df = pd.read_excel(io.BytesIO(self.to_bytes()))
|
37
|
-
return df.to_html()
|
38
|
-
except ImportError as e:
|
39
|
-
raise RuntimeError(
|
40
|
-
'Please install "langfun[mime-xlsx]" to enable XLSX support.'
|
41
|
-
) from e
|
42
|
-
|
43
|
-
def _is_compatible(self, mime_types: Iterable[str]) -> bool:
|
44
|
-
return bool(set(mime_types).intersection([
|
45
|
-
'text/html',
|
46
|
-
'text/plain',
|
47
|
-
]))
|
48
|
-
|
49
|
-
def _make_compatible(self, mime_types: Iterable[str]) -> mime.Mime:
|
50
|
-
"""Returns the MimeType of the converted file."""
|
51
|
-
del mime_types
|
52
|
-
return mime.Mime(uri=self.uri, content=self._raw_html())
|
53
|
-
|
54
|
-
|
55
|
-
class Docx(mime.Mime):
|
56
|
-
"""Docx file type."""
|
57
|
-
|
58
|
-
MIME_PREFIX = (
|
59
|
-
'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
60
|
-
)
|
61
|
-
|
62
|
-
def to_xml(self) -> str:
|
63
|
-
try:
|
64
|
-
import docx # pylint: disable=g-import-not-at-top
|
65
|
-
doc = docx.Document(io.BytesIO(self.to_bytes()))
|
66
|
-
return str(doc.element.xml)
|
67
|
-
except ImportError as e:
|
68
|
-
raise RuntimeError(
|
69
|
-
'Please install "langfun[mime-docx]" to enable Docx support.'
|
70
|
-
) from e
|
71
|
-
|
72
|
-
def _repr_html_(self) -> str:
|
73
|
-
return self.to_xml()
|
74
|
-
|
75
|
-
def _is_compatible(self, mime_types: Iterable[str]) -> bool:
|
76
|
-
return bool(set(mime_types).intersection([
|
77
|
-
'application/xml',
|
78
|
-
'text/xml',
|
79
|
-
'text/plain',
|
80
|
-
]))
|
81
|
-
|
82
|
-
def _make_compatible(self, mime_types: Iterable[str]) -> mime.Mime:
|
83
|
-
"""Returns the MimeType of the converted file."""
|
84
|
-
del mime_types
|
85
|
-
return mime.Mime(uri=self.uri, content=self.to_xml())
|
86
|
-
|
87
|
-
|
88
|
-
class Pptx(mime.Mime):
|
89
|
-
"""Pptx file type."""
|
90
|
-
|
91
|
-
MIME_PREFIX = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
|
92
|
-
API_URL = 'https://v2.convertapi.com/convert/pptx/to/pdf'
|
93
|
-
|
94
|
-
def to_pdf(self, convert_api_key: str | None = None) -> pdf.PDF:
|
95
|
-
api_key = convert_api_key or os.environ.get('CONVERT_API_KEY')
|
96
|
-
url = f'{self.API_URL}?Secret={api_key}'
|
97
|
-
|
98
|
-
json = {
|
99
|
-
'Parameters': [{
|
100
|
-
'Name': 'File',
|
101
|
-
'FileValue': {
|
102
|
-
'Name': os.path.basename(self.uri) if self.uri else 'tmp.pptx',
|
103
|
-
'Data': base64.b64encode(self.to_bytes()).decode('utf-8'),
|
104
|
-
},
|
105
|
-
}]
|
106
|
-
}
|
107
|
-
response = requests.post(url, json=json).json()
|
108
|
-
base64_pdf = response['Files'][0]['FileData']
|
109
|
-
return pdf.PDF.from_bytes(base64.b64decode(base64_pdf))
|
110
|
-
|
111
|
-
def _is_compatible(self, mime_types: Iterable[str]) -> bool:
|
112
|
-
return 'application/pdf' in mime_types
|
113
|
-
|
114
|
-
def _make_compatible(self, mime_types: Iterable[str]) -> mime.Mime:
|
115
|
-
"""Returns the MimeType of the converted file."""
|
116
|
-
del mime_types
|
117
|
-
return self.to_pdf()
|