ommlds 0.0.0.dev330__tar.gz → 0.0.0.dev332__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.
- {ommlds-0.0.0.dev330/ommlds.egg-info → ommlds-0.0.0.dev332}/PKG-INFO +3 -3
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/.manifests.json +33 -33
- ommlds-0.0.0.dev332/ommlds/backends/openai/protocol/__init__.py +110 -0
- ommlds-0.0.0.dev332/ommlds/backends/openai/protocol/chatcompletion/chunk.py +71 -0
- ommlds-0.0.0.dev332/ommlds/backends/openai/protocol/chatcompletion/contentpart.py +77 -0
- ommlds-0.0.0.dev332/ommlds/backends/openai/protocol/chatcompletion/message.py +91 -0
- ommlds-0.0.0.dev332/ommlds/backends/openai/protocol/chatcompletion/request.py +140 -0
- ommlds-0.0.0.dev332/ommlds/backends/openai/protocol/chatcompletion/response.py +90 -0
- ommlds-0.0.0.dev332/ommlds/backends/openai/protocol/chatcompletion/responseformat.py +41 -0
- ommlds-0.0.0.dev332/ommlds/backends/openai/protocol/chatcompletion/tokenlogprob.py +17 -0
- ommlds-0.0.0.dev332/ommlds/backends/openai/protocol/completionusage.py +24 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/sessions/chat.py +66 -63
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/sessions/completion.py +2 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/sessions/embedding.py +2 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/__init__.py +19 -9
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/anthropic/chat.py +3 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/duckduckgo.py +3 -6
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/google/chat.py +2 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/google/search.py +1 -1
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/llamacpp/chat.py +4 -5
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/llamacpp/completion.py +2 -2
- ommlds-0.0.0.dev332/ommlds/minichain/backends/llamacpp/streaming.py +80 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/mistral.py +2 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/mlx/chat.py +2 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/openai/chat.py +4 -11
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/openai/completion.py +2 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/openai/embedding.py +2 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/openai/format.py +16 -15
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/openai/streaming.py +22 -29
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/tinygrad/chat.py +2 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/transformers/sentence.py +2 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/transformers/transformers.py +4 -4
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/chat/history.py +3 -3
- ommlds-0.0.0.dev332/ommlds/minichain/chat/services.py +39 -0
- ommlds-0.0.0.dev332/ommlds/minichain/chat/streaming.py +30 -0
- ommlds-0.0.0.dev332/ommlds/minichain/chat/types.py +15 -0
- ommlds-0.0.0.dev332/ommlds/minichain/completion.py +47 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/llms/services.py +2 -2
- ommlds-0.0.0.dev332/ommlds/minichain/registry.py +238 -0
- ommlds-0.0.0.dev332/ommlds/minichain/resources.py +163 -0
- ommlds-0.0.0.dev332/ommlds/minichain/search.py +58 -0
- ommlds-0.0.0.dev332/ommlds/minichain/services/__init__.py +28 -0
- ommlds-0.0.0.dev332/ommlds/minichain/services/_marshal.py +99 -0
- ommlds-0.0.0.dev332/ommlds/minichain/services/_origclasses.py +45 -0
- ommlds-0.0.0.dev332/ommlds/minichain/services/_typedvalues.py +136 -0
- ommlds-0.0.0.dev332/ommlds/minichain/services/facades.py +74 -0
- ommlds-0.0.0.dev332/ommlds/minichain/services/requests.py +56 -0
- ommlds-0.0.0.dev332/ommlds/minichain/services/responses.py +56 -0
- ommlds-0.0.0.dev332/ommlds/minichain/services/services.py +13 -0
- ommlds-0.0.0.dev332/ommlds/minichain/streaming.py +63 -0
- ommlds-0.0.0.dev332/ommlds/minichain/vectors/embeddings.py +41 -0
- ommlds-0.0.0.dev332/ommlds/minichain/vectors/index.py +50 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/vectors/search.py +10 -26
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/server/server.py +4 -4
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/tools/git.py +6 -6
- ommlds-0.0.0.dev332/ommlds/wiki/text/__init__.py +0 -0
- ommlds-0.0.0.dev332/ommlds/wiki/utils/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332/ommlds.egg-info}/PKG-INFO +3 -3
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds.egg-info/SOURCES.txt +20 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds.egg-info/requires.txt +2 -2
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/pyproject.toml +3 -3
- ommlds-0.0.0.dev330/ommlds/minichain/backends/llamacpp/streaming.py +0 -84
- ommlds-0.0.0.dev330/ommlds/minichain/backends/manifests.py +0 -138
- ommlds-0.0.0.dev330/ommlds/minichain/chat/services.py +0 -59
- ommlds-0.0.0.dev330/ommlds/minichain/chat/streaming.py +0 -62
- ommlds-0.0.0.dev330/ommlds/minichain/chat/types.py +0 -15
- ommlds-0.0.0.dev330/ommlds/minichain/completion.py +0 -68
- ommlds-0.0.0.dev330/ommlds/minichain/resources.py +0 -121
- ommlds-0.0.0.dev330/ommlds/minichain/search.py +0 -74
- ommlds-0.0.0.dev330/ommlds/minichain/services.py +0 -259
- ommlds-0.0.0.dev330/ommlds/minichain/streaming.py +0 -28
- ommlds-0.0.0.dev330/ommlds/minichain/vectors/embeddings.py +0 -54
- ommlds-0.0.0.dev330/ommlds/minichain/vectors/index.py +0 -65
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/LICENSE +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/MANIFEST.in +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/README.md +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/__about__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/llamacpp/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/llamacpp/buildwheel.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/llamacpp/logging.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/__main__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/caching.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/cli.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/generation.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/limits.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/loading.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/tokenization/LICENSE +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/tokenization/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/tokenization/detokenization/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/tokenization/detokenization/base.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/tokenization/detokenization/bpe.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/tokenization/detokenization/naive.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/tokenization/detokenization/spm.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/tokenization/loading.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/tokenization/tokenization.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/mlx/tokenization/types.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/backends/tinygrad → ommlds-0.0.0.dev332/ommlds/backends/openai}/__init__.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/backends/tinygrad/models → ommlds-0.0.0.dev332/ommlds/backends/openai/protocol/chatcompletion}/__init__.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/cli → ommlds-0.0.0.dev332/ommlds/backends/tinygrad}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/LICENSE +0 -0
- {ommlds-0.0.0.dev330/ommlds/cli/sessions → ommlds-0.0.0.dev332/ommlds/backends/tinygrad/models}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/__main__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/attention.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/fetch.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/llm.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/loading.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/quantization.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/repl.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/sampling.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/tokenization.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/llama3/transformer.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/sdxl/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/sdxl/__main__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/sdxl/cli.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/sdxl/clip.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/sdxl/sdxl.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/models/sdxl/unet.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/tinygrad/tinygrad.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/torch/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/torch/backends.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/torch/devices.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/backends/torch/purge.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/cli/tools → ommlds-0.0.0.dev332/ommlds/cli}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/__main__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/inject.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/main.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/datasets → ommlds-0.0.0.dev332/ommlds/cli/sessions}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/sessions/base.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/sessions/inject.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/state.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/datasets/library → ommlds-0.0.0.dev332/ommlds/cli/tools}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/tools/inject.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/cli/tools/tools.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/hacks → ommlds-0.0.0.dev332/ommlds/datasets}/__init__.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/backends → ommlds-0.0.0.dev332/ommlds/datasets/library}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/datasets/library/movies.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/backends/anthropic → ommlds-0.0.0.dev332/ommlds/hacks}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/hacks/patches.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/huggingface.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/_abc.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/backends/google → ommlds-0.0.0.dev332/ommlds/minichain/backends}/__init__.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/backends/llamacpp → ommlds-0.0.0.dev332/ommlds/minichain/backends/anthropic}/__init__.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/backends/mlx → ommlds-0.0.0.dev332/ommlds/minichain/backends/google}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/huggingface.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/backends/openai → ommlds-0.0.0.dev332/ommlds/minichain/backends/llamacpp}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/llamacpp/format.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/backends/sentencepiece → ommlds-0.0.0.dev332/ommlds/minichain/backends/mlx}/__init__.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/backends/tinygrad → ommlds-0.0.0.dev332/ommlds/minichain/backends/openai}/__init__.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/backends/tokenizers → ommlds-0.0.0.dev332/ommlds/minichain/backends/sentencepiece}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/sentencepiece/tokens.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/sqlite.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/backends/transformers → ommlds-0.0.0.dev332/ommlds/minichain/backends/tinygrad}/__init__.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/chat → ommlds-0.0.0.dev332/ommlds/minichain/backends/tokenizers}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/tokenizers/tokens.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/content → ommlds-0.0.0.dev332/ommlds/minichain/backends/transformers}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/backends/transformers/tokens.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/llms → ommlds-0.0.0.dev332/ommlds/minichain/chat}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/chat/choices.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/chat/formats.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/chat/marshal.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/chat/messages.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/chat/templating.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/chat/tools.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/configs.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/text → ommlds-0.0.0.dev332/ommlds/minichain/content}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/content/content.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/content/images.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/content/marshal.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/content/rendering.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/content/transforms.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/docs/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/docs/docs.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/docs/dtypes.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/docs/filters.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/envs.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/json.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/text/toolparsing → ommlds-0.0.0.dev332/ommlds/minichain/llms}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/llms/marshal.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/llms/tokens.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/standard.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/tools → ommlds-0.0.0.dev332/ommlds/minichain/text}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/text/applypatch.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/minichain/vectors → ommlds-0.0.0.dev332/ommlds/minichain/text/toolparsing}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/text/toolparsing/base.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/text/toolparsing/dumb.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/text/toolparsing/llamacpp/LICENSE +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/text/toolparsing/llamacpp/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/text/toolparsing/llamacpp/hermes2.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/text/toolparsing/llamacpp/llama31.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/text/toolparsing/llamacpp/types.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/text/toolparsing/llamacpp/utils.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/tokens/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/tokens/specials.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/tokens/tokenizers.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/tokens/types.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/tokens/vocabs.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/server → ommlds-0.0.0.dev332/ommlds/minichain/tools}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/tools/jsonschema.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/tools/marshal.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/tools/reflection.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/tools/types.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/tools → ommlds-0.0.0.dev332/ommlds/minichain/vectors}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/vectors/similarity.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/vectors/stores.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/minichain/vectors/types.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/wiki → ommlds-0.0.0.dev332/ommlds/server}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/server/__main__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/server/cli.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/server/client.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/server/service.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/wiki/text → ommlds-0.0.0.dev332/ommlds/tools}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/tools/ocr.py +0 -0
- {ommlds-0.0.0.dev330/ommlds/wiki/utils → ommlds-0.0.0.dev332/ommlds/wiki}/__init__.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/wiki/analyze.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/wiki/convert.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/wiki/models.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/wiki/text/mfh.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/wiki/text/wtp.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/wiki/utils/io.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/wiki/utils/progress.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/wiki/utils/xml.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds/wiki/xml.py +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds.egg-info/dependency_links.txt +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds.egg-info/entry_points.txt +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/ommlds.egg-info/top_level.txt +0 -0
- {ommlds-0.0.0.dev330 → ommlds-0.0.0.dev332}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ommlds
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev332
|
|
4
4
|
Summary: ommlds
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,8 +12,8 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: >=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omdev==0.0.0.
|
|
16
|
-
Requires-Dist: omlish==0.0.0.
|
|
15
|
+
Requires-Dist: omdev==0.0.0.dev332
|
|
16
|
+
Requires-Dist: omlish==0.0.0.dev332
|
|
17
17
|
Provides-Extra: all
|
|
18
18
|
Requires-Dist: llama-cpp-python~=0.3; extra == "all"
|
|
19
19
|
Requires-Dist: mlx~=0.26; extra == "all"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"file": "ommlds/minichain/backends/anthropic/chat.py",
|
|
21
21
|
"line": 30,
|
|
22
22
|
"value": {
|
|
23
|
-
"$.minichain.
|
|
23
|
+
"$.minichain.registry.RegistryManifest": {
|
|
24
24
|
"mod_name": "ommlds.minichain.backends.anthropic.chat",
|
|
25
25
|
"attr_name": "AnthropicChatService",
|
|
26
26
|
"name": "anthropic",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"file": "ommlds/minichain/backends/duckduckgo.py",
|
|
36
36
|
"line": 21,
|
|
37
37
|
"value": {
|
|
38
|
-
"$.minichain.
|
|
38
|
+
"$.minichain.registry.RegistryManifest": {
|
|
39
39
|
"mod_name": "ommlds.minichain.backends.duckduckgo",
|
|
40
40
|
"attr_name": "DuckduckgoSearchService",
|
|
41
41
|
"name": "duckduckgo",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"file": "ommlds/minichain/backends/google/chat.py",
|
|
53
53
|
"line": 26,
|
|
54
54
|
"value": {
|
|
55
|
-
"$.minichain.
|
|
55
|
+
"$.minichain.registry.RegistryManifest": {
|
|
56
56
|
"mod_name": "ommlds.minichain.backends.google.chat",
|
|
57
57
|
"attr_name": "GoogleChatService",
|
|
58
58
|
"name": "google",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"module": ".minichain.backends.llamacpp.chat",
|
|
66
66
|
"attr": null,
|
|
67
67
|
"file": "ommlds/minichain/backends/llamacpp/chat.py",
|
|
68
|
-
"line":
|
|
68
|
+
"line": 32,
|
|
69
69
|
"value": {
|
|
70
|
-
"$.minichain.
|
|
70
|
+
"$.minichain.registry.RegistryManifest": {
|
|
71
71
|
"mod_name": "ommlds.minichain.backends.llamacpp.chat",
|
|
72
72
|
"attr_name": "LlamacppChatService",
|
|
73
73
|
"name": "llamacpp",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"file": "ommlds/minichain/backends/llamacpp/completion.py",
|
|
83
83
|
"line": 25,
|
|
84
84
|
"value": {
|
|
85
|
-
"$.minichain.
|
|
85
|
+
"$.minichain.registry.RegistryManifest": {
|
|
86
86
|
"mod_name": "ommlds.minichain.backends.llamacpp.completion",
|
|
87
87
|
"attr_name": "LlamacppCompletionService",
|
|
88
88
|
"name": "llamacpp",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"module": ".minichain.backends.llamacpp.streaming",
|
|
96
96
|
"attr": null,
|
|
97
97
|
"file": "ommlds/minichain/backends/llamacpp/streaming.py",
|
|
98
|
-
"line":
|
|
98
|
+
"line": 28,
|
|
99
99
|
"value": {
|
|
100
|
-
"$.minichain.
|
|
100
|
+
"$.minichain.registry.RegistryManifest": {
|
|
101
101
|
"mod_name": "ommlds.minichain.backends.llamacpp.streaming",
|
|
102
102
|
"attr_name": "LlamacppChatStreamService",
|
|
103
103
|
"name": "llamacpp",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"file": "ommlds/minichain/backends/mistral.py",
|
|
113
113
|
"line": 24,
|
|
114
114
|
"value": {
|
|
115
|
-
"$.minichain.
|
|
115
|
+
"$.minichain.registry.RegistryManifest": {
|
|
116
116
|
"mod_name": "ommlds.minichain.backends.mistral",
|
|
117
117
|
"attr_name": "MistralChatService",
|
|
118
118
|
"name": "mistral",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"file": "ommlds/minichain/backends/mlx/chat.py",
|
|
128
128
|
"line": 28,
|
|
129
129
|
"value": {
|
|
130
|
-
"$.minichain.
|
|
130
|
+
"$.minichain.registry.RegistryManifest": {
|
|
131
131
|
"mod_name": "ommlds.minichain.backends.mlx.chat",
|
|
132
132
|
"attr_name": "MlxChatService",
|
|
133
133
|
"name": "mlx",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"file": "ommlds/minichain/backends/openai/chat.py",
|
|
143
143
|
"line": 34,
|
|
144
144
|
"value": {
|
|
145
|
-
"$.minichain.
|
|
145
|
+
"$.minichain.registry.RegistryManifest": {
|
|
146
146
|
"mod_name": "ommlds.minichain.backends.openai.chat",
|
|
147
147
|
"attr_name": "OpenaiChatService",
|
|
148
148
|
"name": "openai",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"file": "ommlds/minichain/backends/openai/completion.py",
|
|
158
158
|
"line": 18,
|
|
159
159
|
"value": {
|
|
160
|
-
"$.minichain.
|
|
160
|
+
"$.minichain.registry.RegistryManifest": {
|
|
161
161
|
"mod_name": "ommlds.minichain.backends.openai.completion",
|
|
162
162
|
"attr_name": "OpenaiCompletionService",
|
|
163
163
|
"name": "openai",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"file": "ommlds/minichain/backends/openai/embedding.py",
|
|
173
173
|
"line": 17,
|
|
174
174
|
"value": {
|
|
175
|
-
"$.minichain.
|
|
175
|
+
"$.minichain.registry.RegistryManifest": {
|
|
176
176
|
"mod_name": "ommlds.minichain.backends.openai.embedding",
|
|
177
177
|
"attr_name": "OpenaiEmbeddingService",
|
|
178
178
|
"name": "openai",
|
|
@@ -185,9 +185,9 @@
|
|
|
185
185
|
"module": ".minichain.backends.openai.streaming",
|
|
186
186
|
"attr": null,
|
|
187
187
|
"file": "ommlds/minichain/backends/openai/streaming.py",
|
|
188
|
-
"line":
|
|
188
|
+
"line": 28,
|
|
189
189
|
"value": {
|
|
190
|
-
"$.minichain.
|
|
190
|
+
"$.minichain.registry.RegistryManifest": {
|
|
191
191
|
"mod_name": "ommlds.minichain.backends.openai.streaming",
|
|
192
192
|
"attr_name": "OpenaiChatStreamService",
|
|
193
193
|
"name": "openai",
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"file": "ommlds/minichain/backends/tinygrad/chat.py",
|
|
203
203
|
"line": 19,
|
|
204
204
|
"value": {
|
|
205
|
-
"$.minichain.
|
|
205
|
+
"$.minichain.registry.RegistryManifest": {
|
|
206
206
|
"mod_name": "ommlds.minichain.backends.tinygrad.chat",
|
|
207
207
|
"attr_name": "TinygradLlama3ChatService",
|
|
208
208
|
"name": "tinygrad_llama3",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"file": "ommlds/minichain/backends/transformers/sentence.py",
|
|
218
218
|
"line": 18,
|
|
219
219
|
"value": {
|
|
220
|
-
"$.minichain.
|
|
220
|
+
"$.minichain.registry.RegistryManifest": {
|
|
221
221
|
"mod_name": "ommlds.minichain.backends.transformers.sentence",
|
|
222
222
|
"attr_name": "SentenceTransformersEmbeddingService",
|
|
223
223
|
"name": "sentence_transformers",
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
"file": "ommlds/minichain/backends/transformers/transformers.py",
|
|
235
235
|
"line": 41,
|
|
236
236
|
"value": {
|
|
237
|
-
"$.minichain.
|
|
237
|
+
"$.minichain.registry.RegistryManifest": {
|
|
238
238
|
"mod_name": "ommlds.minichain.backends.transformers.transformers",
|
|
239
239
|
"attr_name": "TransformersCompletionService",
|
|
240
240
|
"name": "transformers",
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
"file": "ommlds/minichain/backends/transformers/transformers.py",
|
|
252
252
|
"line": 124,
|
|
253
253
|
"value": {
|
|
254
|
-
"$.minichain.
|
|
254
|
+
"$.minichain.registry.RegistryManifest": {
|
|
255
255
|
"mod_name": "ommlds.minichain.backends.transformers.transformers",
|
|
256
256
|
"attr_name": "TransformersChatService",
|
|
257
257
|
"name": "transformers",
|
|
@@ -266,9 +266,9 @@
|
|
|
266
266
|
"module": ".minichain.chat.services",
|
|
267
267
|
"attr": null,
|
|
268
268
|
"file": "ommlds/minichain/chat/services.py",
|
|
269
|
-
"line":
|
|
269
|
+
"line": 36,
|
|
270
270
|
"value": {
|
|
271
|
-
"$.minichain.
|
|
271
|
+
"$.minichain.registry.RegistryTypeManifest": {
|
|
272
272
|
"mod_name": "ommlds.minichain.chat.services",
|
|
273
273
|
"attr_name": "ChatService"
|
|
274
274
|
}
|
|
@@ -278,9 +278,9 @@
|
|
|
278
278
|
"module": ".minichain.chat.streaming",
|
|
279
279
|
"attr": null,
|
|
280
280
|
"file": "ommlds/minichain/chat/streaming.py",
|
|
281
|
-
"line":
|
|
281
|
+
"line": 27,
|
|
282
282
|
"value": {
|
|
283
|
-
"$.minichain.
|
|
283
|
+
"$.minichain.registry.RegistryTypeManifest": {
|
|
284
284
|
"mod_name": "ommlds.minichain.chat.streaming",
|
|
285
285
|
"attr_name": "ChatStreamService"
|
|
286
286
|
}
|
|
@@ -290,9 +290,9 @@
|
|
|
290
290
|
"module": ".minichain.completion",
|
|
291
291
|
"attr": null,
|
|
292
292
|
"file": "ommlds/minichain/completion.py",
|
|
293
|
-
"line":
|
|
293
|
+
"line": 44,
|
|
294
294
|
"value": {
|
|
295
|
-
"$.minichain.
|
|
295
|
+
"$.minichain.registry.RegistryTypeManifest": {
|
|
296
296
|
"mod_name": "ommlds.minichain.completion",
|
|
297
297
|
"attr_name": "CompletionService"
|
|
298
298
|
}
|
|
@@ -302,9 +302,9 @@
|
|
|
302
302
|
"module": ".minichain.search",
|
|
303
303
|
"attr": null,
|
|
304
304
|
"file": "ommlds/minichain/search.py",
|
|
305
|
-
"line":
|
|
305
|
+
"line": 55,
|
|
306
306
|
"value": {
|
|
307
|
-
"$.minichain.
|
|
307
|
+
"$.minichain.registry.RegistryTypeManifest": {
|
|
308
308
|
"mod_name": "ommlds.minichain.search",
|
|
309
309
|
"attr_name": "SearchService"
|
|
310
310
|
}
|
|
@@ -314,9 +314,9 @@
|
|
|
314
314
|
"module": ".minichain.vectors.embeddings",
|
|
315
315
|
"attr": null,
|
|
316
316
|
"file": "ommlds/minichain/vectors/embeddings.py",
|
|
317
|
-
"line":
|
|
317
|
+
"line": 38,
|
|
318
318
|
"value": {
|
|
319
|
-
"$.minichain.
|
|
319
|
+
"$.minichain.registry.RegistryTypeManifest": {
|
|
320
320
|
"mod_name": "ommlds.minichain.vectors.embeddings",
|
|
321
321
|
"attr_name": "EmbeddingService"
|
|
322
322
|
}
|
|
@@ -326,9 +326,9 @@
|
|
|
326
326
|
"module": ".minichain.vectors.index",
|
|
327
327
|
"attr": null,
|
|
328
328
|
"file": "ommlds/minichain/vectors/index.py",
|
|
329
|
-
"line":
|
|
329
|
+
"line": 47,
|
|
330
330
|
"value": {
|
|
331
|
-
"$.minichain.
|
|
331
|
+
"$.minichain.registry.RegistryTypeManifest": {
|
|
332
332
|
"mod_name": "ommlds.minichain.vectors.index",
|
|
333
333
|
"attr_name": "VectorIndexService"
|
|
334
334
|
}
|
|
@@ -338,9 +338,9 @@
|
|
|
338
338
|
"module": ".minichain.vectors.search",
|
|
339
339
|
"attr": null,
|
|
340
340
|
"file": "ommlds/minichain/vectors/search.py",
|
|
341
|
-
"line":
|
|
341
|
+
"line": 67,
|
|
342
342
|
"value": {
|
|
343
|
-
"$.minichain.
|
|
343
|
+
"$.minichain.registry.RegistryTypeManifest": {
|
|
344
344
|
"mod_name": "ommlds.minichain.vectors.search",
|
|
345
345
|
"attr_name": "VectorSearchService"
|
|
346
346
|
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"""
|
|
2
|
+
https://platform.openai.com/docs/api-reference/introduction
|
|
3
|
+
https://github.com/openai/openai-openapi/blob/master/openapi.yaml
|
|
4
|
+
"""
|
|
5
|
+
# ruff: noqa: I001
|
|
6
|
+
|
|
7
|
+
from .chatcompletion.chunk import ( # noqa
|
|
8
|
+
ChatCompletionChunkChoiceDeltaToolCallFunction,
|
|
9
|
+
ChatCompletionChunkChoiceDeltaToolCall,
|
|
10
|
+
ChatCompletionChunkChoiceDelta,
|
|
11
|
+
|
|
12
|
+
ChatCompletionChunkChoiceLogprobs,
|
|
13
|
+
ChatCompletionChunkChoice,
|
|
14
|
+
|
|
15
|
+
ChatCompletionChunk,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
from .chatcompletion.contentpart import ( # noqa
|
|
19
|
+
TextChatCompletionContentPart,
|
|
20
|
+
|
|
21
|
+
ImageChatCompletionContentPartImageUrl,
|
|
22
|
+
ImageChatCompletionContentPart,
|
|
23
|
+
|
|
24
|
+
FileChatCompletionContentPartFileInfo,
|
|
25
|
+
FileChatCompletionContentPart,
|
|
26
|
+
|
|
27
|
+
InputAudioChatCompletionContentPartInputAudio,
|
|
28
|
+
InputAudioChatCompletionContentPart,
|
|
29
|
+
|
|
30
|
+
RefusalChatCompletionContentPart,
|
|
31
|
+
|
|
32
|
+
ChatCompletionContentPart,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
from .chatcompletion.message import ( # noqa
|
|
36
|
+
DeveloperChatCompletionMessage,
|
|
37
|
+
|
|
38
|
+
SystemChatCompletionMessage,
|
|
39
|
+
|
|
40
|
+
UserChatCompletionMessage,
|
|
41
|
+
|
|
42
|
+
AssistantChatCompletionMessageAudio,
|
|
43
|
+
AssistantChatCompletionMessageToolCallFunction,
|
|
44
|
+
AssistantChatCompletionMessageToolCall,
|
|
45
|
+
AssistantChatCompletionMessage,
|
|
46
|
+
|
|
47
|
+
ToolChatCompletionMessage,
|
|
48
|
+
|
|
49
|
+
FunctionChatCompletionMessage,
|
|
50
|
+
|
|
51
|
+
ChatCompletionMessage,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
from .chatcompletion.request import ( # noqa
|
|
55
|
+
ChatCompletionRequestWebSearchOptionsUserLocationApproximate,
|
|
56
|
+
ChatCompletionRequestWebSearchOptionsUserLocation,
|
|
57
|
+
ChatCompletionRequestWebSearchOptions,
|
|
58
|
+
|
|
59
|
+
ChatCompletionRequestPrediction,
|
|
60
|
+
|
|
61
|
+
ChatCompletionRequestToolFunction,
|
|
62
|
+
ChatCompletionRequestTool,
|
|
63
|
+
|
|
64
|
+
ChatCompletionRequestStreamOptions,
|
|
65
|
+
|
|
66
|
+
ChatCompletionRequestNamedToolChoiceFunction,
|
|
67
|
+
ChatCompletionRequestNamedToolChoice,
|
|
68
|
+
|
|
69
|
+
ChatCompletionRequestAudio,
|
|
70
|
+
|
|
71
|
+
ChatCompletionRequest,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
from .chatcompletion.response import ( # noqa
|
|
75
|
+
ChatCompletionResponseAnnotationUrlCitation,
|
|
76
|
+
ChatCompletionResponseAnnotation,
|
|
77
|
+
|
|
78
|
+
ChatCompletionResponseAudio,
|
|
79
|
+
|
|
80
|
+
ChatCompletionResponseMessageToolCallFunction,
|
|
81
|
+
ChatCompletionResponseMessageToolCall,
|
|
82
|
+
ChatCompletionResponseMessage,
|
|
83
|
+
|
|
84
|
+
ChatCompletionResponseChoiceLogprobs,
|
|
85
|
+
ChatCompletionResponseChoice,
|
|
86
|
+
|
|
87
|
+
ChatCompletionResponse,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
from .chatcompletion.responseformat import ( # noqa
|
|
91
|
+
TextChatCompletionResponseFormat,
|
|
92
|
+
|
|
93
|
+
JsonSchemaChatCompletionResponseFormatJsonSchema,
|
|
94
|
+
JsonSchemaChatCompletionResponseFormat,
|
|
95
|
+
|
|
96
|
+
JsonObjectChatCompletionResponseFormat,
|
|
97
|
+
|
|
98
|
+
ChatCompletionResponseFormat,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
from .chatcompletion.tokenlogprob import ( # noqa
|
|
102
|
+
ChatCompletionTokenLogprobTopLogprob,
|
|
103
|
+
ChatCompletionTokenLogprob,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
from .completionusage import ( # noqa
|
|
107
|
+
CompletionUsageCompletionTokensDetails,
|
|
108
|
+
CompletionUsagePromptTokensDetails,
|
|
109
|
+
CompletionUsage,
|
|
110
|
+
)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import typing as ta
|
|
2
|
+
|
|
3
|
+
from .tokenlogprob import ChatCompletionTokenLogprob
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
##
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ChatCompletionChunkChoiceDeltaToolCallFunction(ta.TypedDict, total=False):
|
|
10
|
+
arguments: str
|
|
11
|
+
name: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ChatCompletionChunkChoiceDeltaToolCall(ta.TypedDict):
|
|
15
|
+
index: int
|
|
16
|
+
id: ta.NotRequired[str]
|
|
17
|
+
function: ta.NotRequired[ChatCompletionChunkChoiceDeltaToolCallFunction]
|
|
18
|
+
type: ta.Literal['function']
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
#
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ChatCompletionChunkChoiceDelta(ta.TypedDict, total=False):
|
|
25
|
+
content: str
|
|
26
|
+
refusal: str
|
|
27
|
+
role: ta.Literal[
|
|
28
|
+
'developer',
|
|
29
|
+
'system',
|
|
30
|
+
'user',
|
|
31
|
+
'assistant',
|
|
32
|
+
'tool',
|
|
33
|
+
]
|
|
34
|
+
tool_calls: ta.Sequence[ChatCompletionChunkChoiceDeltaToolCall]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
#
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class ChatCompletionChunkChoiceLogprobs(ta.TypedDict, total=False):
|
|
41
|
+
content: ta.Sequence[ChatCompletionTokenLogprob]
|
|
42
|
+
refusal: ta.Sequence[ChatCompletionTokenLogprob]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class ChatCompletionChunkChoice(ta.TypedDict):
|
|
46
|
+
delta: ChatCompletionChunkChoiceDelta
|
|
47
|
+
finish_reason: ta.NotRequired[ta.Literal[
|
|
48
|
+
'stop',
|
|
49
|
+
'length',
|
|
50
|
+
'tool_calls',
|
|
51
|
+
'content_filter',
|
|
52
|
+
]]
|
|
53
|
+
index: int
|
|
54
|
+
logprobs: ta.NotRequired[ChatCompletionChunkChoiceLogprobs]
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
#
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class ChatCompletionChunk(ta.TypedDict):
|
|
61
|
+
id: str
|
|
62
|
+
choices: ta.Sequence[ChatCompletionChunkChoice]
|
|
63
|
+
created: int
|
|
64
|
+
model: str
|
|
65
|
+
object: ta.Literal['chat.completion.chunk']
|
|
66
|
+
service_tier: ta.NotRequired[ta.Literal[
|
|
67
|
+
'auto',
|
|
68
|
+
'default',
|
|
69
|
+
'flex',
|
|
70
|
+
]]
|
|
71
|
+
system_fingerprint: ta.NotRequired[str]
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# ruff: noqa: UP007
|
|
2
|
+
import typing as ta
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
##
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TextChatCompletionContentPart(ta.TypedDict):
|
|
9
|
+
text: str
|
|
10
|
+
type: ta.Literal['text']
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ImageChatCompletionContentPartImageUrl(ta.TypedDict):
|
|
17
|
+
url: ta.Required[str]
|
|
18
|
+
detail: ta.NotRequired[ta.Literal[
|
|
19
|
+
'auto',
|
|
20
|
+
'low',
|
|
21
|
+
'high',
|
|
22
|
+
]]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ImageChatCompletionContentPart(ta.TypedDict):
|
|
26
|
+
image_url: ImageChatCompletionContentPartImageUrl
|
|
27
|
+
type: ta.Literal['image_url']
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
#
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class FileChatCompletionContentPartFileInfo(ta.TypedDict, total=False):
|
|
34
|
+
file_data: str
|
|
35
|
+
file_id: str
|
|
36
|
+
filename: str
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class FileChatCompletionContentPart(ta.TypedDict):
|
|
40
|
+
file: FileChatCompletionContentPartFileInfo
|
|
41
|
+
type: ta.Literal['file']
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
#
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class InputAudioChatCompletionContentPartInputAudio(ta.TypedDict):
|
|
48
|
+
data: str
|
|
49
|
+
format: ta.Literal[
|
|
50
|
+
'wav',
|
|
51
|
+
'mp3',
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class InputAudioChatCompletionContentPart(ta.TypedDict):
|
|
56
|
+
input_audio: InputAudioChatCompletionContentPartInputAudio
|
|
57
|
+
type: ta.Literal['input_audio']
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
#
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class RefusalChatCompletionContentPart(ta.TypedDict):
|
|
64
|
+
refusal: str
|
|
65
|
+
type: ta.Literal['refusal']
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
#
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
ChatCompletionContentPart: ta.TypeAlias = ta.Union[
|
|
72
|
+
TextChatCompletionContentPart,
|
|
73
|
+
ImageChatCompletionContentPart,
|
|
74
|
+
FileChatCompletionContentPart,
|
|
75
|
+
InputAudioChatCompletionContentPart,
|
|
76
|
+
RefusalChatCompletionContentPart,
|
|
77
|
+
]
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# ruff: noqa: UP007
|
|
2
|
+
import typing as ta
|
|
3
|
+
|
|
4
|
+
from .contentpart import ChatCompletionContentPart
|
|
5
|
+
from .contentpart import RefusalChatCompletionContentPart
|
|
6
|
+
from .contentpart import TextChatCompletionContentPart
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
##
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DeveloperChatCompletionMessage(ta.TypedDict):
|
|
13
|
+
content: str | ta.Iterable[TextChatCompletionContentPart]
|
|
14
|
+
role: ta.Literal['developer']
|
|
15
|
+
name: ta.NotRequired[str]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class SystemChatCompletionMessage(ta.TypedDict):
|
|
22
|
+
content: str | ta.Iterable[TextChatCompletionContentPart]
|
|
23
|
+
role: ta.Literal['system']
|
|
24
|
+
name: ta.NotRequired[str]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
#
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class UserChatCompletionMessage(ta.TypedDict):
|
|
31
|
+
content: str | ta.Iterable[ChatCompletionContentPart]
|
|
32
|
+
role: ta.Literal['user']
|
|
33
|
+
name: ta.NotRequired[str]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
#
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class AssistantChatCompletionMessageAudio(ta.TypedDict):
|
|
40
|
+
id: str
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class AssistantChatCompletionMessageToolCallFunction(ta.TypedDict):
|
|
44
|
+
arguments: str
|
|
45
|
+
name: str
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class AssistantChatCompletionMessageToolCall(ta.TypedDict):
|
|
49
|
+
id: str
|
|
50
|
+
function: AssistantChatCompletionMessageToolCallFunction
|
|
51
|
+
type: ta.Literal['function']
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class AssistantChatCompletionMessage(ta.TypedDict, total=False):
|
|
55
|
+
role: ta.Required[ta.Literal['assistant']]
|
|
56
|
+
audio: AssistantChatCompletionMessageAudio
|
|
57
|
+
content: str | ta.Iterable[TextChatCompletionContentPart | RefusalChatCompletionContentPart]
|
|
58
|
+
name: str
|
|
59
|
+
refusal: str
|
|
60
|
+
tool_calls: ta.Iterable[AssistantChatCompletionMessageToolCall]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
#
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class ToolChatCompletionMessage(ta.TypedDict):
|
|
67
|
+
content: str | ta.Iterable[TextChatCompletionContentPart]
|
|
68
|
+
role: ta.Literal['tool']
|
|
69
|
+
tool_call_id: str
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
#
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class FunctionChatCompletionMessage(ta.TypedDict):
|
|
76
|
+
content: str | None
|
|
77
|
+
name: str
|
|
78
|
+
role: ta.Literal['function']
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
#
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
ChatCompletionMessage: ta.TypeAlias = ta.Union[
|
|
85
|
+
DeveloperChatCompletionMessage,
|
|
86
|
+
SystemChatCompletionMessage,
|
|
87
|
+
UserChatCompletionMessage,
|
|
88
|
+
AssistantChatCompletionMessage,
|
|
89
|
+
ToolChatCompletionMessage,
|
|
90
|
+
FunctionChatCompletionMessage,
|
|
91
|
+
]
|