Skip to content

Commit

Permalink
Refactor file structure and imports for doc generator
Browse files Browse the repository at this point in the history
  • Loading branch information
nadeem4 committed Oct 29, 2024
1 parent d8a77f4 commit 31fe771
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc_craft/core/constant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AI_MODEL = {"model_name": "gpt-3.5-turbo", "model_family": "openai"}
7 changes: 6 additions & 1 deletion doc_craft/utils/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
from .env_apikey_handler import EnvAPIKeyHandler
from .azurekeyvault_apikey_handler import AzureKeyVaultAPIKeyHandler
import sys
from doc_craft.core.constant import AI_MODEL


class LLM:
"""A class that represents a Language Model (LLM)."""

# TODO: allow user to specify model_name and model_family
def __init__(self, model_name="gpt-3.5-turbo", model_family="openai"):
def __init__(
self,
model_name=AI_MODEL.get("model_name"),
model_family=AI_MODEL.get("model_family"),
):
"""Initialize a Model object with the specified model name and model family.
Args:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from setuptools import setup, find_packages

setup(
name="DocCraft",
version="1.0.3",
name="doc-craft",
version="1.0.5",
description="A tool to add docstrings to Python code using LLMs.",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 31fe771

Please sign in to comment.