Skip to content

Commit

Permalink
Merge pull request #129 from mraniki/dev
Browse files Browse the repository at this point in the history
♻️   self.llm_model
  • Loading branch information
mraniki authored Oct 1, 2023
2 parents 1ec8516 + b341549 commit f500de8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@ repos:
rev: v0.0.291
hooks:
- id: ruff
#args: [--fix, --exit-non-zero-on-fix]
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: trailing-whitespace
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.10.0
hooks:
- id: pretty-format-toml
# args: [--autofix]
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: '' # Use the sha / tag you want to point at
# hooks:
# - id: prettier
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<a href="https://github.com/mraniki/myllm/"><img src="https://img.shields.io/github/actions/workflow/status/mraniki/myllm/%F0%9F%91%B7Flow.yml?style=for-the-badge&logo=GitHub&logoColor=white"></a><br>
<a href="https://talky.readthedocs.io/projects/myllm/"><img src="https://readthedocs.org/projects/myllm/badge/?version=latest&style=for-the-badge"></a><br>
<a href="https://codebeat.co/projects/github-com-mraniki-myllm-main"><img src="https://codebeat.co/badges/0567b9d9-3cbb-4263-80ec-8ac8043332ea"/></a> <br>
<a href="https://app.codacy.com/gh/mraniki/MyLLM/dashboard"><img src="https://app.codacy.com/project/badge/Grade/75f2650d58044355957fe667aeed50a1"/></a> <br>
<a href="https://codecov.io/gh/mraniki/myllm"><img src="https://codecov.io/gh/mraniki/myllm/branch/main/graph/badge.svg?token=WAHUEMAJN6"/></a><br>
</td>
<td align="left">
Expand Down
3 changes: 2 additions & 1 deletion myllm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def __init__(self):
provider_module = importlib.import_module(provider_module_name)
provider_class = getattr(provider_module, provider_module_name.split(".")[-1])
self.provider = provider_class()
self.llm_model = settings.llm_model
self.conversation = Conversation()

async def get_myllm_help(self):
Expand Down Expand Up @@ -88,7 +89,7 @@ async def chat(self, prompt):
try:
self.conversation.add_message("user", prompt)
response = await self.provider.create_async(
model=settings.llm_model,
model=self.llm_model,
messages=self.conversation.get_messages(),
)
sleep(settings.lag)
Expand Down

0 comments on commit f500de8

Please sign in to comment.