Skip to content

Commit

Permalink
Adjust system prompt and adjust readme
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashacker committed Apr 11, 2024
1 parent b468919 commit cbfdd37
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 160 deletions.
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,6 @@ Once your virtual environment is activated, you'll see its name in the terminal

> Remember to deactivate the virtual environment when you're done working with Verba by simply running deactivate in the terminal.
## Linting
We use [ruff](https://github.com/astral-sh/ruff) for automatic code formation and linting.
The process is automated with a pre-commit hook. To install the hook, run:
```
pre-commit install
```
or for shorthand:
```bash
make pre-commit
```
After that all your commits will be automatically linted and formatted. The linting will happen only on the files you changed.

`make pre-commit` formats all files in the repository and install the hooks if needed.

# 📦 Choosing the Right Verba Installation Package
Verba comes in several installation packages, each tailored for specific use cases and environments. Choose the package that aligns with your requirements:

Expand Down
11 changes: 6 additions & 5 deletions goldenverba/components/generation/GPT4Generator.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import asyncio
import os
from collections.abc import Iterator

from dotenv import load_dotenv

from collections.abc import Iterator
from goldenverba.components.generation.interface import Generator

load_dotenv()
Expand Down Expand Up @@ -48,7 +49,7 @@ async def generate(
if "OPENAI_API_BASE" in os.environ:
openai.api_base = os.getenv("OPENAI_API_BASE")
if "OPENAI_API_VERSION" in os.environ:
openai.api_version = os.getenv("OPENAI_API_VERSION")
openai.api_version = os.getenv("OPENAI_API_VERSION")

chat_completion_arguments = {
"model":self.model_name,
Expand All @@ -57,7 +58,7 @@ async def generate(
if openai.api_type=="azure":
chat_completion_arguments["deployment_id"]=self.model_name


base_url = os.environ.get("OPENAI_BASE_URL", "")
if base_url:
openai.api_base = base_url
Expand Down Expand Up @@ -102,7 +103,7 @@ async def generate_stream(
if "OPENAI_API_BASE" in os.environ:
openai.api_base = os.getenv("OPENAI_API_BASE")
if "OPENAI_API_VERSION" in os.environ:
openai.api_version = os.getenv("OPENAI_API_VERSION")
openai.api_version = os.getenv("OPENAI_API_VERSION")

chat_completion_arguments = {
"model":self.model_name,
Expand All @@ -111,7 +112,7 @@ async def generate_stream(
"temperature":0.0
}
if openai.api_type=="azure":
chat_completion_arguments["deployment_id"]=self.model_name
chat_completion_arguments["deployment_id"]=self.model_name

completion = await openai.ChatCompletion.acreate(
**chat_completion_arguments
Expand Down
124 changes: 0 additions & 124 deletions pyproject.toml

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ accelerate
cohere==4.33
requests
pypdf2
pre-commit
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
classifiers=[
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -33,7 +31,7 @@
"spacy==3.6.1",
"fastapi==0.102.0",
"uvicorn[standard]",
"click== 8.1.7",
"click==8.1.7",
"asyncio",
"tiktoken==0.5.1",
"cohere==4.33",
Expand All @@ -46,8 +44,7 @@
"wheel",
"twine",
"black>=23.7.0",
"setuptools",
"pre-commit",
"setuptools"
],
"huggingface": [
"sentence-transformers",
Expand Down

0 comments on commit cbfdd37

Please sign in to comment.