janus-llm 3.2.0__py3-none-any.whl → 3.3.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. janus/__init__.py +3 -3
  2. janus/_tests/test_cli.py +3 -3
  3. janus/cli.py +1 -1
  4. janus/converter/__init__.py +6 -6
  5. janus/converter/_tests/test_translate.py +6 -233
  6. janus/converter/converter.py +49 -7
  7. janus/converter/diagram.py +68 -55
  8. janus/embedding/_tests/test_collections.py +2 -2
  9. janus/embedding/_tests/test_database.py +1 -1
  10. janus/embedding/_tests/test_vectorize.py +3 -3
  11. janus/embedding/collections.py +2 -2
  12. janus/embedding/database.py +1 -1
  13. janus/embedding/embedding_models_info.py +1 -1
  14. janus/embedding/vectorize.py +5 -5
  15. janus/language/_tests/test_combine.py +1 -1
  16. janus/language/_tests/test_splitter.py +1 -1
  17. janus/language/alc/_tests/test_alc.py +3 -3
  18. janus/language/alc/alc.py +5 -5
  19. janus/language/binary/_tests/test_binary.py +2 -2
  20. janus/language/binary/binary.py +5 -5
  21. janus/language/block.py +2 -2
  22. janus/language/combine.py +3 -3
  23. janus/language/file.py +2 -2
  24. janus/language/mumps/_tests/test_mumps.py +3 -3
  25. janus/language/mumps/mumps.py +5 -5
  26. janus/language/mumps/patterns.py +1 -1
  27. janus/language/naive/__init__.py +4 -4
  28. janus/language/naive/basic_splitter.py +4 -4
  29. janus/language/naive/chunk_splitter.py +4 -4
  30. janus/language/naive/registry.py +1 -1
  31. janus/language/naive/simple_ast.py +5 -5
  32. janus/language/naive/tag_splitter.py +4 -4
  33. janus/language/node.py +1 -1
  34. janus/language/splitter.py +4 -4
  35. janus/language/treesitter/_tests/test_treesitter.py +3 -3
  36. janus/language/treesitter/treesitter.py +4 -4
  37. janus/llm/__init__.py +1 -1
  38. janus/llm/model_callbacks.py +1 -1
  39. janus/llm/models_info.py +5 -3
  40. janus/metrics/_tests/test_bleu.py +1 -1
  41. janus/metrics/_tests/test_chrf.py +1 -1
  42. janus/metrics/_tests/test_file_pairing.py +1 -1
  43. janus/metrics/_tests/test_llm.py +2 -2
  44. janus/metrics/_tests/test_reading.py +1 -1
  45. janus/metrics/_tests/test_rouge_score.py +1 -1
  46. janus/metrics/_tests/test_similarity_score.py +1 -1
  47. janus/metrics/_tests/test_treesitter_metrics.py +2 -2
  48. janus/metrics/bleu.py +1 -1
  49. janus/metrics/chrf.py +1 -1
  50. janus/metrics/complexity_metrics.py +4 -4
  51. janus/metrics/file_pairing.py +5 -5
  52. janus/metrics/llm_metrics.py +1 -1
  53. janus/metrics/metric.py +7 -7
  54. janus/metrics/reading.py +1 -1
  55. janus/metrics/rouge_score.py +1 -1
  56. janus/metrics/similarity.py +2 -2
  57. janus/parsers/_tests/test_code_parser.py +1 -1
  58. janus/parsers/code_parser.py +2 -2
  59. janus/parsers/doc_parser.py +3 -3
  60. janus/parsers/eval_parser.py +2 -2
  61. janus/parsers/refiner_parser.py +49 -0
  62. janus/parsers/reqs_parser.py +3 -3
  63. janus/parsers/uml.py +1 -2
  64. janus/prompts/prompt.py +2 -2
  65. janus/refiners/refiner.py +63 -0
  66. janus/utils/_tests/test_logger.py +1 -1
  67. janus/utils/_tests/test_progress.py +1 -1
  68. janus/utils/progress.py +1 -1
  69. {janus_llm-3.2.0.dist-info → janus_llm-3.3.0.dist-info}/METADATA +1 -1
  70. janus_llm-3.3.0.dist-info/RECORD +107 -0
  71. janus_llm-3.2.0.dist-info/RECORD +0 -105
  72. {janus_llm-3.2.0.dist-info → janus_llm-3.3.0.dist-info}/LICENSE +0 -0
  73. {janus_llm-3.2.0.dist-info → janus_llm-3.3.0.dist-info}/WHEEL +0 -0
  74. {janus_llm-3.2.0.dist-info → janus_llm-3.3.0.dist-info}/entry_points.txt +0 -0
@@ -6,10 +6,10 @@ from typing import Any, Dict, Optional, Sequence
6
6
  from chromadb import Client, Collection
7
7
  from langchain_community.vectorstores import Chroma
8
8
 
9
- from ..language.block import CodeBlock, TranslatedCodeBlock
10
- from ..utils.enums import EmbeddingType
11
- from .collections import Collections
12
- from .database import ChromaEmbeddingDatabase
9
+ from janus.embedding.collections import Collections
10
+ from janus.embedding.database import ChromaEmbeddingDatabase
11
+ from janus.language.block import CodeBlock, TranslatedCodeBlock
12
+ from janus.utils.enums import EmbeddingType
13
13
 
14
14
 
15
15
  class Vectorizer(object):
@@ -59,7 +59,7 @@ class Vectorizer(object):
59
59
  self,
60
60
  code_block: CodeBlock,
61
61
  collection_name: EmbeddingType | str,
62
- filename: str # perhaps this should be a relative path from the source, but for
62
+ filename: str, # perhaps this should be a relative path from the source, but for
63
63
  # now we're all in 1 directory
64
64
  ) -> None:
65
65
  """Calculate `code_block` embedding, returning success & storing in `embedding_id`
@@ -1,6 +1,6 @@
1
1
  import unittest
2
2
 
3
- from ..combine import CodeBlock, Combiner, TranslatedCodeBlock
3
+ from janus.language.combine import CodeBlock, Combiner, TranslatedCodeBlock
4
4
 
5
5
 
6
6
  class TestCombiner(unittest.TestCase):
@@ -1,6 +1,6 @@
1
1
  import unittest
2
2
 
3
- from ..splitter import Splitter
3
+ from janus.language.splitter import Splitter
4
4
 
5
5
 
6
6
  class TestSplitter(unittest.TestCase):
@@ -1,9 +1,9 @@
1
1
  import unittest
2
2
  from pathlib import Path
3
3
 
4
- from ....llm import load_model
5
- from ...combine import Combiner
6
- from ..alc import AlcSplitter
4
+ from janus.language.alc import AlcSplitter
5
+ from janus.language.combine import Combiner
6
+ from janus.llm import load_model
7
7
 
8
8
 
9
9
  class TestAlcSplitter(unittest.TestCase):
janus/language/alc/alc.py CHANGED
@@ -1,10 +1,10 @@
1
1
  from langchain.schema.language_model import BaseLanguageModel
2
2
 
3
- from ...utils.logger import create_logger
4
- from ..block import CodeBlock
5
- from ..combine import Combiner
6
- from ..node import NodeType
7
- from ..treesitter import TreeSitterSplitter
3
+ from janus.language.block import CodeBlock
4
+ from janus.language.combine import Combiner
5
+ from janus.language.node import NodeType
6
+ from janus.language.treesitter import TreeSitterSplitter
7
+ from janus.utils.logger import create_logger
8
8
 
9
9
  log = create_logger(__name__)
10
10
 
@@ -5,8 +5,8 @@ from unittest.mock import patch
5
5
 
6
6
  import pytest
7
7
 
8
- from ....llm import load_model
9
- from ..binary import BinarySplitter
8
+ from janus.language.binary import BinarySplitter
9
+ from janus.llm import load_model
10
10
 
11
11
 
12
12
  class TestBinarySplitter(unittest.TestCase):
@@ -7,11 +7,11 @@ from pathlib import Path
7
7
  import tree_sitter
8
8
  from langchain.schema.language_model import BaseLanguageModel
9
9
 
10
- from ...utils.enums import LANGUAGES
11
- from ...utils.logger import create_logger
12
- from ..block import CodeBlock
13
- from ..combine import Combiner
14
- from ..treesitter import TreeSitterSplitter
10
+ from janus.language.block import CodeBlock
11
+ from janus.language.combine import Combiner
12
+ from janus.language.treesitter import TreeSitterSplitter
13
+ from janus.utils.enums import LANGUAGES
14
+ from janus.utils.logger import create_logger
15
15
 
16
16
  log = create_logger(__name__)
17
17
 
janus/language/block.py CHANGED
@@ -1,8 +1,8 @@
1
1
  from functools import total_ordering
2
2
  from typing import ForwardRef, Hashable, Optional, Tuple
3
3
 
4
- from ..utils.logger import create_logger
5
- from .node import NodeType
4
+ from janus.language.node import NodeType
5
+ from janus.utils.logger import create_logger
6
6
 
7
7
  log = create_logger(__name__)
8
8
 
janus/language/combine.py CHANGED
@@ -1,6 +1,6 @@
1
- from ..utils.logger import create_logger
2
- from .block import CodeBlock, TranslatedCodeBlock
3
- from .file import FileManager
1
+ from janus.language.block import CodeBlock, TranslatedCodeBlock
2
+ from janus.language.file import FileManager
3
+ from janus.utils.logger import create_logger
4
4
 
5
5
  log = create_logger(__name__)
6
6
 
janus/language/file.py CHANGED
@@ -1,5 +1,5 @@
1
- from ..utils.enums import LANGUAGES
2
- from ..utils.logger import create_logger
1
+ from janus.utils.enums import LANGUAGES
2
+ from janus.utils.logger import create_logger
3
3
 
4
4
  log = create_logger(__name__)
5
5
 
@@ -1,9 +1,9 @@
1
1
  import unittest
2
2
  from pathlib import Path
3
3
 
4
- from ....llm import load_model
5
- from ...combine import Combiner
6
- from ..mumps import MumpsSplitter
4
+ from janus.language.combine import Combiner
5
+ from janus.language.mumps import MumpsSplitter
6
+ from janus.llm import load_model
7
7
 
8
8
 
9
9
  class TestMumpsSplitter(unittest.TestCase):
@@ -2,11 +2,11 @@ import re
2
2
 
3
3
  from langchain.schema.language_model import BaseLanguageModel
4
4
 
5
- from ...utils.logger import create_logger
6
- from ..block import CodeBlock
7
- from ..combine import Combiner
8
- from ..node import NodeType
9
- from ..splitter import Splitter
5
+ from janus.language.block import CodeBlock
6
+ from janus.language.combine import Combiner
7
+ from janus.language.node import NodeType
8
+ from janus.language.splitter import Splitter
9
+ from janus.utils.logger import create_logger
10
10
 
11
11
  log = create_logger(__name__)
12
12
 
@@ -1,7 +1,7 @@
1
1
  import re
2
2
  from dataclasses import dataclass
3
3
 
4
- from ...utils.logger import create_logger
4
+ from janus.utils.logger import create_logger
5
5
 
6
6
  log = create_logger(__name__)
7
7
 
@@ -1,4 +1,4 @@
1
- from .basic_splitter import FileSplitter
2
- from .chunk_splitter import ChunkSplitter
3
- from .simple_ast import get_flexible_ast, get_strict_ast
4
- from .tag_splitter import TagSplitter
1
+ from janus.language.naive.basic_splitter import FileSplitter
2
+ from janus.language.naive.chunk_splitter import ChunkSplitter
3
+ from janus.language.naive.simple_ast import get_flexible_ast, get_strict_ast
4
+ from janus.language.naive.tag_splitter import TagSplitter
@@ -1,7 +1,7 @@
1
- from ..block import CodeBlock
2
- from ..naive.chunk_splitter import ChunkSplitter
3
- from ..naive.registry import register_splitter
4
- from ..splitter import FileSizeError
1
+ from janus.language.block import CodeBlock
2
+ from janus.language.naive.chunk_splitter import ChunkSplitter
3
+ from janus.language.naive.registry import register_splitter
4
+ from janus.language.splitter import FileSizeError
5
5
 
6
6
 
7
7
  @register_splitter("file")
@@ -1,7 +1,7 @@
1
- from ..block import CodeBlock
2
- from ..node import NodeType
3
- from ..splitter import Splitter
4
- from .registry import register_splitter
1
+ from janus.language.block import CodeBlock
2
+ from janus.language.naive.registry import register_splitter
3
+ from janus.language.node import NodeType
4
+ from janus.language.splitter import Splitter
5
5
 
6
6
 
7
7
  @register_splitter("chunk")
@@ -1,6 +1,6 @@
1
1
  from typing import Callable, Dict
2
2
 
3
- from ..splitter import Splitter
3
+ from janus.language.splitter import Splitter
4
4
 
5
5
  CUSTOM_SPLITTERS: Dict[str, Callable[..., Splitter]] = dict()
6
6
 
@@ -1,8 +1,8 @@
1
- from ...utils.enums import LANGUAGES
2
- from ..alc.alc import AlcSplitter
3
- from ..mumps.mumps import MumpsSplitter
4
- from ..treesitter import TreeSitterSplitter
5
- from .registry import register_splitter
1
+ from janus.language.alc.alc import AlcSplitter
2
+ from janus.language.mumps.mumps import MumpsSplitter
3
+ from janus.language.naive.registry import register_splitter
4
+ from janus.language.treesitter import TreeSitterSplitter
5
+ from janus.utils.enums import LANGUAGES
6
6
 
7
7
 
8
8
  @register_splitter("ast-flex")
@@ -1,7 +1,7 @@
1
- from ..block import CodeBlock
2
- from ..node import NodeType
3
- from ..splitter import Splitter
4
- from .registry import register_splitter
1
+ from janus.language.block import CodeBlock
2
+ from janus.language.naive.registry import register_splitter
3
+ from janus.language.node import NodeType
4
+ from janus.language.splitter import Splitter
5
5
 
6
6
 
7
7
  @register_splitter("tag")
janus/language/node.py CHANGED
@@ -1,6 +1,6 @@
1
1
  from typing import NewType, Tuple
2
2
 
3
- from ..utils.logger import create_logger
3
+ from janus.utils.logger import create_logger
4
4
 
5
5
  log = create_logger(__name__)
6
6
 
@@ -6,10 +6,10 @@ from typing import List
6
6
  import tiktoken
7
7
  from langchain.schema.language_model import BaseLanguageModel
8
8
 
9
- from ..utils.logger import create_logger
10
- from .block import CodeBlock
11
- from .file import FileManager
12
- from .node import NodeType
9
+ from janus.language.block import CodeBlock
10
+ from janus.language.file import FileManager
11
+ from janus.language.node import NodeType
12
+ from janus.utils.logger import create_logger
13
13
 
14
14
  log = create_logger(__name__)
15
15
 
@@ -1,9 +1,9 @@
1
1
  import unittest
2
2
  from pathlib import Path
3
3
 
4
- from ....llm import load_model
5
- from ...combine import Combiner
6
- from ..treesitter import TreeSitterSplitter
4
+ from janus.language.combine import Combiner
5
+ from janus.language.treesitter import TreeSitterSplitter
6
+ from janus.llm import load_model
7
7
 
8
8
 
9
9
  class TestTreeSitterSplitter(unittest.TestCase):
@@ -9,10 +9,10 @@ import tree_sitter
9
9
  from git import Repo
10
10
  from langchain.schema.language_model import BaseLanguageModel
11
11
 
12
- from ...utils.enums import LANGUAGES
13
- from ...utils.logger import create_logger
14
- from ..block import CodeBlock, NodeType
15
- from ..splitter import Splitter
12
+ from janus.language.block import CodeBlock, NodeType
13
+ from janus.language.splitter import Splitter
14
+ from janus.utils.enums import LANGUAGES
15
+ from janus.utils.logger import create_logger
16
16
 
17
17
  log = create_logger(__name__)
18
18
 
janus/llm/__init__.py CHANGED
@@ -1 +1 @@
1
- from .models_info import load_model
1
+ from janus.llm.models_info import load_model
@@ -8,7 +8,7 @@ from langchain_core.messages import AIMessage
8
8
  from langchain_core.outputs import ChatGeneration, LLMResult
9
9
  from langchain_core.tracers.context import register_configure_hook
10
10
 
11
- from ..utils.logger import create_logger
11
+ from janus.utils.logger import create_logger
12
12
 
13
13
  log = create_logger(__name__)
14
14
 
janus/llm/models_info.py CHANGED
@@ -8,7 +8,8 @@ from langchain_community.llms import HuggingFaceTextGenInference
8
8
  from langchain_core.language_models import BaseLanguageModel
9
9
  from langchain_openai import ChatOpenAI
10
10
 
11
- from ..prompts.prompt import (
11
+ from janus.llm.model_callbacks import COST_PER_1K_TOKENS
12
+ from janus.prompts.prompt import (
12
13
  ChatGptPromptEngine,
13
14
  ClaudePromptEngine,
14
15
  CoherePromptEngine,
@@ -18,8 +19,7 @@ from ..prompts.prompt import (
18
19
  PromptEngine,
19
20
  TitanPromptEngine,
20
21
  )
21
- from ..utils.logger import create_logger
22
- from .model_callbacks import COST_PER_1K_TOKENS
22
+ from janus.utils.logger import create_logger
23
23
 
24
24
  log = create_logger(__name__)
25
25
 
@@ -47,6 +47,7 @@ load_dotenv()
47
47
 
48
48
  openai_model_reroutes = {
49
49
  "gpt-4o": "gpt-4o-2024-05-13",
50
+ "gpt-4o-mini": "gpt-4o-mini",
50
51
  "gpt-4": "gpt-4-0613",
51
52
  "gpt-4-turbo": "gpt-4-turbo-2024-04-09",
52
53
  "gpt-4-turbo-preview": "gpt-4-0125-preview",
@@ -56,6 +57,7 @@ openai_model_reroutes = {
56
57
 
57
58
  openai_models = [
58
59
  "gpt-4o",
60
+ "gpt-4o-mini",
59
61
  "gpt-4",
60
62
  "gpt-4-turbo",
61
63
  "gpt-4-turbo-preview",
@@ -2,7 +2,7 @@ import unittest
2
2
 
3
3
  from sacrebleu import sentence_bleu
4
4
 
5
- from ..bleu import bleu
5
+ from janus.metrics.bleu import bleu
6
6
 
7
7
 
8
8
  class TestBLEU(unittest.TestCase):
@@ -2,7 +2,7 @@ import unittest
2
2
 
3
3
  from sacrebleu import sentence_chrf
4
4
 
5
- from ..chrf import chrf
5
+ from janus.metrics.chrf import chrf
6
6
 
7
7
 
8
8
  class TestChrF(unittest.TestCase):
@@ -3,7 +3,7 @@
3
3
  import unittest
4
4
  from pathlib import Path
5
5
 
6
- from ..file_pairing import (
6
+ from janus.metrics.file_pairing import (
7
7
  FILE_PAIRING_METHODS,
8
8
  pair_by_file,
9
9
  pair_by_line,
@@ -3,8 +3,8 @@ from unittest.mock import patch
3
3
 
4
4
  import pytest
5
5
 
6
- from ...llm.models_info import load_model
7
- from ..llm_metrics import llm_evaluate_option, llm_evaluate_ref_option
6
+ from janus.llm.models_info import load_model
7
+ from janus.metrics.llm_metrics import llm_evaluate_option, llm_evaluate_ref_option
8
8
 
9
9
 
10
10
  class TestLLMMetrics(unittest.TestCase):
@@ -1,6 +1,6 @@
1
1
  import unittest
2
2
 
3
- from ..reading import _repeat_text, flesch, gunning_fog
3
+ from janus.metrics.reading import _repeat_text, flesch, gunning_fog
4
4
 
5
5
 
6
6
  class TestReading(unittest.TestCase):
@@ -1,6 +1,6 @@
1
1
  import unittest
2
2
 
3
- from ..rouge_score import rouge
3
+ from janus.metrics.rouge_score import rouge
4
4
 
5
5
 
6
6
  class TestRouge(unittest.TestCase):
@@ -1,6 +1,6 @@
1
1
  import unittest
2
2
 
3
- from ..similarity import similarity_score
3
+ from janus.metrics.similarity import similarity_score
4
4
 
5
5
 
6
6
  class TestSimilarityScore(unittest.TestCase):
@@ -3,8 +3,8 @@ from pathlib import Path
3
3
 
4
4
  from typer.testing import CliRunner
5
5
 
6
- from ...cli import app
7
- from ..complexity_metrics import (
6
+ from janus.cli import app
7
+ from janus.metrics.complexity_metrics import (
8
8
  TreeSitterMetric,
9
9
  cyclomatic_complexity,
10
10
  difficulty,
janus/metrics/bleu.py CHANGED
@@ -4,7 +4,7 @@ import click
4
4
  import typer
5
5
  from sacrebleu import sentence_bleu
6
6
 
7
- from .metric import metric
7
+ from janus.metrics.metric import metric
8
8
 
9
9
  # from sacrebleu import sentence_chrf
10
10
 
janus/metrics/chrf.py CHANGED
@@ -1,7 +1,7 @@
1
1
  import typer
2
2
  from sacrebleu import sentence_chrf
3
3
 
4
- from .metric import metric
4
+ from janus.metrics.metric import metric
5
5
 
6
6
 
7
7
  @metric(help="chrF score using sacrebleu")
@@ -1,10 +1,10 @@
1
1
  import math
2
2
  from typing import List, Optional
3
3
 
4
- from ..language.block import CodeBlock
5
- from ..language.treesitter.treesitter import TreeSitterSplitter
6
- from ..utils.enums import LANGUAGES
7
- from .metric import metric
4
+ from janus.language.block import CodeBlock
5
+ from janus.language.treesitter import TreeSitterSplitter
6
+ from janus.metrics.metric import metric
7
+ from janus.utils.enums import LANGUAGES
8
8
 
9
9
 
10
10
  class NodeException(Exception):
@@ -1,10 +1,10 @@
1
1
  from typing import Any, Callable
2
2
 
3
- from ..language.binary import BinarySplitter
4
- from ..language.mumps import MumpsSplitter
5
- from ..language.node import NodeType
6
- from ..language.treesitter import TreeSitterSplitter
7
- from ..utils.enums import CUSTOM_SPLITTERS
3
+ from janus.language.binary import BinarySplitter
4
+ from janus.language.mumps import MumpsSplitter
5
+ from janus.language.node import NodeType
6
+ from janus.language.treesitter import TreeSitterSplitter
7
+ from janus.utils.enums import CUSTOM_SPLITTERS
8
8
 
9
9
  FILE_PAIRING_METHODS: dict[str, Callable[[str, str], list[tuple[str, str]]]] = {}
10
10
 
@@ -9,7 +9,7 @@ from langchain_core.prompts import PromptTemplate
9
9
  from langchain_core.pydantic_v1 import BaseModel, Field
10
10
  from typing_extensions import Annotated
11
11
 
12
- from .metric import metric
12
+ from janus.metrics.metric import metric
13
13
 
14
14
 
15
15
  class LLMMetricOutput(BaseModel):
janus/metrics/metric.py CHANGED
@@ -7,13 +7,13 @@ import click
7
7
  import typer
8
8
  from typing_extensions import Annotated
9
9
 
10
- from ..llm import load_model
11
- from ..utils.enums import LANGUAGES
12
- from ..utils.logger import create_logger
13
- from ..utils.progress import track
14
- from .cli import evaluate
15
- from .file_pairing import FILE_PAIRING_METHODS
16
- from .splitting import SPLITTING_METHODS
10
+ from janus.llm import load_model
11
+ from janus.metrics.cli import evaluate
12
+ from janus.metrics.file_pairing import FILE_PAIRING_METHODS
13
+ from janus.metrics.splitting import SPLITTING_METHODS
14
+ from janus.utils.enums import LANGUAGES
15
+ from janus.utils.logger import create_logger
16
+ from janus.utils.progress import track
17
17
 
18
18
  log = create_logger(__name__)
19
19
 
janus/metrics/reading.py CHANGED
@@ -4,7 +4,7 @@ import nltk
4
4
  import readability
5
5
  from nltk.tokenize import TweetTokenizer
6
6
 
7
- from .metric import metric
7
+ from janus.metrics.metric import metric
8
8
 
9
9
 
10
10
  def word_count(text):
@@ -4,7 +4,7 @@ import typer
4
4
  from rouge import Rouge
5
5
  from typing_extensions import Annotated
6
6
 
7
- from .metric import metric
7
+ from janus.metrics.metric import metric
8
8
 
9
9
 
10
10
  @metric(help="ROUGE score")
@@ -3,8 +3,8 @@ import typer
3
3
  from langchain.evaluation import EmbeddingDistance, load_evaluator
4
4
  from typing_extensions import Annotated
5
5
 
6
- from ..embedding.embedding_models_info import load_embedding_model
7
- from .metric import metric
6
+ from janus.embedding.embedding_models_info import load_embedding_model
7
+ from janus.metrics.metric import metric
8
8
 
9
9
 
10
10
  @metric(name="similarity-score", help="Distance between embeddings of strings.")
@@ -1,6 +1,6 @@
1
1
  import unittest
2
2
 
3
- from ..code_parser import CodeParser, JanusParser
3
+ from janus.parsers.code_parser import CodeParser, JanusParser
4
4
 
5
5
 
6
6
  class TestJanusParser(unittest.TestCase):
@@ -5,8 +5,8 @@ from langchain_core.exceptions import OutputParserException
5
5
  from langchain_core.messages import BaseMessage
6
6
  from langchain_core.output_parsers import StrOutputParser
7
7
 
8
- from ..language.block import CodeBlock
9
- from ..utils.logger import create_logger
8
+ from janus.language.block import CodeBlock
9
+ from janus.utils.logger import create_logger
10
10
 
11
11
  log = create_logger(__name__)
12
12
 
@@ -8,9 +8,9 @@ from langchain_core.exceptions import OutputParserException
8
8
  from langchain_core.messages import AIMessage
9
9
  from langchain_core.pydantic_v1 import BaseModel, Field
10
10
 
11
- from ..language.block import CodeBlock
12
- from ..utils.logger import create_logger
13
- from .code_parser import JanusParser
11
+ from janus.language.block import CodeBlock
12
+ from janus.parsers.code_parser import JanusParser
13
+ from janus.utils.logger import create_logger
14
14
 
15
15
  log = create_logger(__name__)
16
16
 
@@ -3,8 +3,8 @@ import json
3
3
  from langchain.output_parsers import PydanticOutputParser
4
4
  from langchain_core.pydantic_v1 import BaseModel, Field, validator
5
5
 
6
- from ..utils.logger import create_logger
7
- from .code_parser import JanusParser
6
+ from janus.parsers.code_parser import JanusParser
7
+ from janus.utils.logger import create_logger
8
8
 
9
9
  log = create_logger(__name__)
10
10