OneLLM 0.0.6__tar.gz → 0.0.7__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.
- {onellm-0.0.6 → onellm-0.0.7/OneLLM.egg-info}/PKG-INFO +2 -1
- {onellm-0.0.6 → onellm-0.0.7}/OneLLM.egg-info/SOURCES.txt +1 -0
- {onellm-0.0.6/OneLLM.egg-info → onellm-0.0.7}/PKG-INFO +2 -1
- {onellm-0.0.6 → onellm-0.0.7}/README.md +1 -0
- onellm-0.0.7/onellm/.version +1 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/config.py +4 -4
- {onellm-0.0.6 → onellm-0.0.7}/onellm/models.py +52 -1
- {onellm-0.0.6 → onellm-0.0.7}/onellm/utils/__init__.py +8 -4
- onellm-0.0.7/onellm/utils/text_cleaner.py +137 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_config_full_coverage.py +1 -1
- onellm-0.0.6/onellm/.version +0 -1
- {onellm-0.0.6 → onellm-0.0.7}/LICENSE +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/MANIFEST.in +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/OneLLM.egg-info/dependency_links.txt +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/OneLLM.egg-info/top_level.txt +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/__init__.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/audio.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/chat_completion.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/client.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/completion.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/embedding.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/errors.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/files.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/image.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/providers/__init__.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/providers/base.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/providers/fallback.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/providers/openai.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/speech.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/types/__init__.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/types/common.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/utils/fallback.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/utils/retry.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/utils/streaming.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/utils/token_counter.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/onellm/validators.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/pyproject.toml +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/setup.cfg +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/setup.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_audio.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_audio_advanced.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_chat_completion_advanced.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_client_interface.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_combined_coverage.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_completion_advanced.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_completion_final.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_config.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_embedding_full_coverage.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_fallback.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_fallback_100_percent.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_fallback_provider_enhanced.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_fallback_utils_coverage.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_file_operations_parent_creation.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_files_full_coverage.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_image.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_image_coverage_improved.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_json_decode_error.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_json_decode_targeted.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_json_mode.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_json_stream_coverage.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_json_stream_custom.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_openai_additional_coverage.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_openai_additional_lines.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_openai_error_handling.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_openai_file_operations.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_openai_file_upload.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_openai_provider.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_openai_provider_complete_coverage.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_openai_provider_expanded_coverage.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_openai_streaming_and_tools.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_pragmas.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_provider_base_complete_coverage.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_provider_capabilities.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_provider_upload_file.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_retries.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_retry_improved.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_speech.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_speech_additional.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_stream_timeout.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_streaming.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_streaming_coverage_improved.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_token_counter.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_token_counter_full_coverage.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_utils.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_validators.py +0 -0
- {onellm-0.0.6 → onellm-0.0.7}/tests/test_vision.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: onellm
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: A unified interface for interacting with large language models from various providers - a complete drop-in replacement for OpenAI's client
|
|
5
5
|
Home-page: https://github.com/muxi-ai/onellm
|
|
6
6
|
Author: Ran Aroussi
|
|
@@ -128,6 +128,7 @@ For more detailed examples, check out the [examples directory](./examples).
|
|
|
128
128
|
| **📺 Streaming support** | Real-time streaming responses from supported providers |
|
|
129
129
|
| **🖼️ Multi-modal capabilities** | Support for text, images, audio across compatible models |
|
|
130
130
|
| **🖼️ Local LLM support** | Support for local LLMs via Ollama and llama.cpp |
|
|
131
|
+
| **🧹 Unicode artifact cleaning** | Automatic removal of invisible characters to prevent AI detection |
|
|
131
132
|
| **🏷️ Consistent naming** | Clear `provider/model-name` format for attribution |
|
|
132
133
|
| **🧪 Comprehensive tests** | 96% test coverage ensuring reliability |
|
|
133
134
|
| **📄 Apache-2.0 license** | Open-source license that protects contributions |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: onellm
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: A unified interface for interacting with large language models from various providers - a complete drop-in replacement for OpenAI's client
|
|
5
5
|
Home-page: https://github.com/muxi-ai/onellm
|
|
6
6
|
Author: Ran Aroussi
|
|
@@ -128,6 +128,7 @@ For more detailed examples, check out the [examples directory](./examples).
|
|
|
128
128
|
| **📺 Streaming support** | Real-time streaming responses from supported providers |
|
|
129
129
|
| **🖼️ Multi-modal capabilities** | Support for text, images, audio across compatible models |
|
|
130
130
|
| **🖼️ Local LLM support** | Support for local LLMs via Ollama and llama.cpp |
|
|
131
|
+
| **🧹 Unicode artifact cleaning** | Automatic removal of invisible characters to prevent AI detection |
|
|
131
132
|
| **🏷️ Consistent naming** | Clear `provider/model-name` format for attribution |
|
|
132
133
|
| **🧪 Comprehensive tests** | 96% test coverage ensuring reliability |
|
|
133
134
|
| **📄 Apache-2.0 license** | Open-source license that protects contributions |
|
|
@@ -102,6 +102,7 @@ For more detailed examples, check out the [examples directory](./examples).
|
|
|
102
102
|
| **📺 Streaming support** | Real-time streaming responses from supported providers |
|
|
103
103
|
| **🖼️ Multi-modal capabilities** | Support for text, images, audio across compatible models |
|
|
104
104
|
| **🖼️ Local LLM support** | Support for local LLMs via Ollama and llama.cpp |
|
|
105
|
+
| **🧹 Unicode artifact cleaning** | Automatic removal of invisible characters to prevent AI detection |
|
|
105
106
|
| **🏷️ Consistent naming** | Clear `provider/model-name` format for attribution |
|
|
106
107
|
| **🧪 Comprehensive tests** | 96% test coverage ensuring reliability |
|
|
107
108
|
| **📄 Apache-2.0 license** | Open-source license that protects contributions |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.7
|
|
@@ -57,7 +57,7 @@ DEFAULT_CONFIG = {
|
|
|
57
57
|
config = DEFAULT_CONFIG.copy()
|
|
58
58
|
|
|
59
59
|
# Environment variables prefixes
|
|
60
|
-
ENV_PREFIX = "
|
|
60
|
+
ENV_PREFIX = "ONELLM_" # Prefix for OneLLM specific environment variables
|
|
61
61
|
PROVIDER_API_KEY_ENV_MAP = {
|
|
62
62
|
"openai": "OPENAI_API_KEY",
|
|
63
63
|
"anthropic": "ANTHROPIC_API_KEY",
|
|
@@ -69,11 +69,11 @@ def _load_env_vars() -> None:
|
|
|
69
69
|
Load configuration from environment variables.
|
|
70
70
|
|
|
71
71
|
This function checks for two types of environment variables:
|
|
72
|
-
1. Variables with
|
|
72
|
+
1. Variables with ONELLM_ prefix for general configuration
|
|
73
73
|
2. Provider-specific API keys using their standard environment variable names
|
|
74
74
|
|
|
75
75
|
Environment variables with double underscores (__) are treated as nested configuration.
|
|
76
|
-
Example:
|
|
76
|
+
Example: ONELLM_PROVIDERS__OPENAI__TIMEOUT would set config["providers"]["openai"]["timeout"].
|
|
77
77
|
"""
|
|
78
78
|
# General configuration
|
|
79
79
|
for key in os.environ:
|
|
@@ -91,7 +91,7 @@ def _load_env_vars() -> None:
|
|
|
91
91
|
config[config_key] = os.environ[key]
|
|
92
92
|
|
|
93
93
|
# Provider API keys (support both prefixed and provider-standard environment variables)
|
|
94
|
-
# This allows users to use either OPENAI_API_KEY or
|
|
94
|
+
# This allows users to use either OPENAI_API_KEY or ONELLM_PROVIDERS__OPENAI__API_KEY
|
|
95
95
|
for provider, env_var in PROVIDER_API_KEY_ENV_MAP.items():
|
|
96
96
|
if env_var in os.environ and provider in config["providers"]:
|
|
97
97
|
config["providers"][provider]["api_key"] = os.environ[env_var]
|
|
@@ -25,9 +25,46 @@ This module contains the data models used for responses and requests
|
|
|
25
25
|
across different API endpoints and providers.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
|
-
from typing import Any, Dict, List, Optional
|
|
28
|
+
from typing import Any, Dict, List, Optional, Union
|
|
29
29
|
from dataclasses import dataclass
|
|
30
30
|
from .types import Message, UsageInfo
|
|
31
|
+
from .utils.text_cleaner import clean_unicode_artifacts
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _clean_message_content(
|
|
35
|
+
content: Union[str, List[Dict[str, Any]], None]
|
|
36
|
+
) -> Union[str, List[Dict[str, Any]], None]:
|
|
37
|
+
"""
|
|
38
|
+
Clean Unicode artifacts from message content.
|
|
39
|
+
|
|
40
|
+
Handles both simple string content and multi-modal content lists.
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
content: The message content to clean
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
Cleaned content with Unicode artifacts removed
|
|
47
|
+
"""
|
|
48
|
+
if content is None:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
if isinstance(content, str):
|
|
52
|
+
return clean_unicode_artifacts(content)
|
|
53
|
+
|
|
54
|
+
if isinstance(content, list):
|
|
55
|
+
# Handle multi-modal content - clean text in ContentItem objects
|
|
56
|
+
cleaned_content = []
|
|
57
|
+
for item in content:
|
|
58
|
+
if isinstance(item, dict) and 'text' in item and isinstance(item['text'], str):
|
|
59
|
+
# Clean the text field in ContentItem
|
|
60
|
+
cleaned_item = item.copy()
|
|
61
|
+
cleaned_item['text'] = clean_unicode_artifacts(item['text'])
|
|
62
|
+
cleaned_content.append(cleaned_item)
|
|
63
|
+
else:
|
|
64
|
+
cleaned_content.append(item)
|
|
65
|
+
return cleaned_content
|
|
66
|
+
|
|
67
|
+
return content
|
|
31
68
|
|
|
32
69
|
|
|
33
70
|
@dataclass
|
|
@@ -52,6 +89,11 @@ class ChoiceDelta:
|
|
|
52
89
|
tool_calls: Optional[List[Dict[str, Any]]] = None
|
|
53
90
|
finish_reason: Optional[str] = None
|
|
54
91
|
|
|
92
|
+
def __post_init__(self):
|
|
93
|
+
"""Clean Unicode artifacts from content after initialization."""
|
|
94
|
+
if self.content is not None:
|
|
95
|
+
self.content = clean_unicode_artifacts(self.content)
|
|
96
|
+
|
|
55
97
|
|
|
56
98
|
@dataclass
|
|
57
99
|
class Choice:
|
|
@@ -91,6 +133,10 @@ class Choice:
|
|
|
91
133
|
self.finish_reason = finish_reason
|
|
92
134
|
self.index = index
|
|
93
135
|
|
|
136
|
+
# Clean Unicode artifacts from message content
|
|
137
|
+
if self.message and 'content' in self.message:
|
|
138
|
+
self.message['content'] = _clean_message_content(self.message['content'])
|
|
139
|
+
|
|
94
140
|
|
|
95
141
|
@dataclass
|
|
96
142
|
class StreamingChoice:
|
|
@@ -263,6 +309,11 @@ class CompletionChoice:
|
|
|
263
309
|
logprobs: Optional[Dict[str, Any]] = None
|
|
264
310
|
finish_reason: Optional[str] = None
|
|
265
311
|
|
|
312
|
+
def __post_init__(self):
|
|
313
|
+
"""Clean Unicode artifacts from text after initialization."""
|
|
314
|
+
if self.text:
|
|
315
|
+
self.text = clean_unicode_artifacts(self.text)
|
|
316
|
+
|
|
266
317
|
|
|
267
318
|
@dataclass
|
|
268
319
|
class CompletionResponse:
|
|
@@ -37,10 +37,14 @@ from .retry import retry_async, RetryConfig
|
|
|
37
37
|
# Import streaming utilities for handling real-time response processing
|
|
38
38
|
from .streaming import stream_generator, StreamingError
|
|
39
39
|
|
|
40
|
+
# Import text cleaning utilities for processing AI model responses
|
|
41
|
+
from .text_cleaner import clean_unicode_artifacts
|
|
42
|
+
|
|
40
43
|
# Define the public API for this module
|
|
41
44
|
__all__ = [
|
|
42
|
-
"retry_async",
|
|
43
|
-
"RetryConfig",
|
|
44
|
-
"stream_generator",
|
|
45
|
-
"StreamingError",
|
|
45
|
+
"retry_async", # Async function decorator that implements retry logic
|
|
46
|
+
"RetryConfig", # Configuration class for customizing retry behavior
|
|
47
|
+
"stream_generator", # Generator function for processing streaming responses
|
|
48
|
+
"StreamingError", # Exception class for streaming-related errors
|
|
49
|
+
"clean_unicode_artifacts", # Function for cleaning Unicode artifacts from text
|
|
46
50
|
]
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
#
|
|
4
|
+
# Unified interface for LLM providers using OpenAI format
|
|
5
|
+
# https://github.com/muxi-ai/onellm
|
|
6
|
+
#
|
|
7
|
+
# Copyright (C) 2025 Ran Aroussi
|
|
8
|
+
#
|
|
9
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
# you may not use this file except in compliance with the License.
|
|
11
|
+
# You may obtain a copy of the License at
|
|
12
|
+
#
|
|
13
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
#
|
|
15
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
# See the License for the specific language governing permissions and
|
|
19
|
+
# limitations under the License.
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
Text cleaning utilities for OneLLM.
|
|
23
|
+
|
|
24
|
+
This module provides utilities for cleaning Unicode artifacts from AI model responses.
|
|
25
|
+
Many AI models inject invisible Unicode characters that can be detected by plagiarism
|
|
26
|
+
and AI detection tools. This module helps normalize text to safe ASCII equivalents.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
import re
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def clean_unicode_artifacts(text: str) -> str:
|
|
33
|
+
"""
|
|
34
|
+
Clean invisible Unicode artifacts from AI model responses.
|
|
35
|
+
|
|
36
|
+
This function removes problematic Unicode characters that AI models often inject,
|
|
37
|
+
such as zero-width spaces and other invisible characters that can be detected
|
|
38
|
+
by plagiarism and AI detection tools, while preserving all legitimate text
|
|
39
|
+
content including multilingual characters.
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
text: The input text containing potential Unicode artifacts
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
The cleaned text with invisible characters removed and typographic
|
|
46
|
+
characters normalized, while preserving all legitimate content
|
|
47
|
+
|
|
48
|
+
Examples:
|
|
49
|
+
>>> clean_unicode_artifacts('"Hello" — World\u200B')
|
|
50
|
+
'"Hello" — World'
|
|
51
|
+
|
|
52
|
+
>>> clean_unicode_artifacts('Text with\u00a0spaces')
|
|
53
|
+
'Text with spaces'
|
|
54
|
+
|
|
55
|
+
>>> clean_unicode_artifacts('こんにちは\u200B世界') # Japanese with zero-width space
|
|
56
|
+
'こんにちは 世界'
|
|
57
|
+
"""
|
|
58
|
+
if not text:
|
|
59
|
+
return text
|
|
60
|
+
|
|
61
|
+
# Normalize common typographic characters to ASCII equivalents
|
|
62
|
+
replacements = {
|
|
63
|
+
# spaces
|
|
64
|
+
'\u202f': " ", # Narrow no-break space → normal space
|
|
65
|
+
'\u00a0': " ", # Non-breaking space → normal space
|
|
66
|
+
'\u2003': " ", # Em space → normal space
|
|
67
|
+
'\u2009': " ", # Thin space → normal space
|
|
68
|
+
# invisible characters
|
|
69
|
+
'\u200B': '', # Zero-width space
|
|
70
|
+
'\u200C': '', # Zero-width non-joiner
|
|
71
|
+
'\u200D': '', # Zero-width joiner
|
|
72
|
+
'\uFEFF': '', # Byte order mark
|
|
73
|
+
'\u200A': '', # Word joiner
|
|
74
|
+
'\u200E': '', # Left-to-right mark
|
|
75
|
+
'\u200F': '', # Right-to-left mark
|
|
76
|
+
'\u2028': '', # Line separator
|
|
77
|
+
'\u2029': '', # Paragraph separator
|
|
78
|
+
'\u202A': '', # Left-to-right embedding
|
|
79
|
+
'\u202B': '', # Right-to-left embedding
|
|
80
|
+
'\u202C': '', # Pop directional formatting
|
|
81
|
+
'\u202D': '', # Left-to-right override
|
|
82
|
+
'\u202E': '', # Right-to-left override
|
|
83
|
+
'\u2060': '', # Word joiner
|
|
84
|
+
'\u2061': '', # Function application
|
|
85
|
+
'\u2062': '', # Invisible times
|
|
86
|
+
'\u2063': '', # Invisible separator
|
|
87
|
+
'\u2064': '', # Invisible plus
|
|
88
|
+
'\u2065': '', # Invisible separator
|
|
89
|
+
'\u2066': '', # Left-to-right isolate
|
|
90
|
+
'\u2067': '', # Right-to-left isolate
|
|
91
|
+
'\u2068': '', # First strong isolate
|
|
92
|
+
'\u2069': '', # Pop directional isolate
|
|
93
|
+
'\u206A': '', # Inhibit symmetric swapping
|
|
94
|
+
'\u206B': '', # Activate symmetric swapping
|
|
95
|
+
'\u206C': '', # Inhibit Arabic form shaping
|
|
96
|
+
'\u206D': '', # Activate Arabic form shaping
|
|
97
|
+
'\u206E': '', # National digit shapes
|
|
98
|
+
'\u206F': '', # Nominal digit shapes
|
|
99
|
+
'\u034F': '', # Combining grapheme joiner
|
|
100
|
+
'\uFE00': '', # Variation selector-1
|
|
101
|
+
'\uFE01': '', # Variation selector-2
|
|
102
|
+
'\uFE02': '', # Variation selector-3
|
|
103
|
+
'\uFE03': '', # Variation selector-4
|
|
104
|
+
'\uFE04': '', # Variation selector-5
|
|
105
|
+
'\uFE05': '', # Variation selector-6
|
|
106
|
+
'\uFE06': '', # Variation selector-7
|
|
107
|
+
'\uFE07': '', # Variation selector-8
|
|
108
|
+
'\uFE08': '', # Variation selector-9
|
|
109
|
+
'\uFE09': '', # Variation selector-10
|
|
110
|
+
'\uFE0A': '', # Variation selector-11
|
|
111
|
+
'\uFE0B': '', # Variation selector-12
|
|
112
|
+
'\uFE0C': '', # Variation selector-13
|
|
113
|
+
'\uFE0D': '', # Variation selector-14
|
|
114
|
+
'\uFE0E': '', # Variation selector-15
|
|
115
|
+
'\uFE0F': '', # Variation selector-16
|
|
116
|
+
# quotes
|
|
117
|
+
'\u2018': "'", # Left single quotation mark
|
|
118
|
+
'\u2019': "'", # Right single quotation mark
|
|
119
|
+
'\u201C': '"', # Left double quotation mark
|
|
120
|
+
'\u201D': '"', # Right double quotation mark
|
|
121
|
+
'\u00AB': '"', # French opening quote → normal quote
|
|
122
|
+
'\u00BB': '"', # French closing quote → normal quote
|
|
123
|
+
# dashes
|
|
124
|
+
'\u2011': '-', # Non-breaking hyphen → regular hyphen
|
|
125
|
+
'\u2013': '–', # En dash
|
|
126
|
+
'\u2014': '—', # Em dash
|
|
127
|
+
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
for orig, repl in replacements.items():
|
|
131
|
+
text = text.replace(orig, repl)
|
|
132
|
+
|
|
133
|
+
# Remove trailing whitespace on every line
|
|
134
|
+
text = re.sub(r'[ \t]+(\r?\n)', r'\1', text)
|
|
135
|
+
|
|
136
|
+
return text
|
|
137
|
+
|
|
@@ -36,7 +36,7 @@ class TestConfigFullCoverage:
|
|
|
36
36
|
os.environ.update(self.original_env)
|
|
37
37
|
|
|
38
38
|
def test_load_env_vars_with_prefixed_vars(self):
|
|
39
|
-
"""Test loading environment variables with
|
|
39
|
+
"""Test loading environment variables with ONELLM_ prefix."""
|
|
40
40
|
# Set environment variables with the prefix
|
|
41
41
|
os.environ[f"{ENV_PREFIX}LOGGING__LEVEL"] = "DEBUG"
|
|
42
42
|
|
onellm-0.0.6/onellm/.version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.0.6
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|