Skip to content

Commit 75d8fb1

Browse files
committed
bump the model
1 parent 10516e0 commit 75d8fb1

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "uv_build"
44

55
[project]
66
name = "indicate"
7-
version = "0.5.0"
7+
version = "0.5.1"
88
description = "Transliterations to/from Indian languages"
99
readme = "README.md"
1010
authors = [

tests/test_llm_indic.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,48 @@ def test_split_mixed_script_text(self):
8888
self.assertEqual(segments[0], ("नमस्ते भाई", "devanagari"))
8989

9090

91+
class TestLLMModuleImport(unittest.TestCase):
92+
"""Test LLM module import and basic functionality without API keys."""
93+
94+
def test_llm_module_import(self):
95+
"""Test that LLM modules can be imported without API keys."""
96+
# Clear all API keys to simulate no-key environment
97+
api_keys = [
98+
"OPENAI_API_KEY",
99+
"ANTHROPIC_API_KEY",
100+
"GOOGLE_API_KEY",
101+
"GEMINI_API_KEY",
102+
"COHERE_API_KEY",
103+
"INDICATE_LLM_PROVIDER",
104+
"INDICATE_LLM_MODEL"
105+
]
106+
original_values = {}
107+
for key in api_keys:
108+
if key in os.environ:
109+
original_values[key] = os.environ[key]
110+
del os.environ[key]
111+
112+
try:
113+
# These imports should work without API keys
114+
from indicate.llm_indic import IndicLLMTransliterator
115+
from indicate.indic_utils import detect_language_from_script
116+
from indicate.cli import cli
117+
118+
# Basic functionality that doesn't require API calls should work
119+
detected = detect_language_from_script("नमस्ते")
120+
self.assertEqual(detected, "hindi")
121+
122+
# LLM class initialization should fail gracefully with clear error
123+
with self.assertRaises(ValueError) as context:
124+
IndicLLMTransliterator("hindi", "english")
125+
self.assertIn("No LLM provider detected", str(context.exception))
126+
127+
finally:
128+
# Restore original environment
129+
for key, value in original_values.items():
130+
os.environ[key] = value
131+
132+
91133
class TestIndicLLMTransliterator(unittest.TestCase):
92134
"""Test IndicLLMTransliterator class."""
93135

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)