Skip to content

Commit

Permalink
minor hotfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
threnjen committed Dec 23, 2024
1 parent d5c01ad commit 11daadc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfiles/Dockerfile.rag_description_generation
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COPY modules/rag_description_generation modules/rag_description_generation
COPY utils utils
COPY modules/rag_description_generation/Pipfile* .
COPY config* .
COPY modules/rag_description_generation/nltk_data root/nltk_data
COPY nltk_data root/nltk_data

# Install dependencies with pipenv
RUN pipenv sync
Expand Down
8 changes: 7 additions & 1 deletion modules/rag_description_generation/rag_dynamodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ def divide_and_process_generated_summary(self, game_id: str, summary: str) -> No
.split("\n\n### Cons\n")[0]
.replace("\n", "")
.replace("-", "")
.strip()
)
cons = (
summary.split("\n\n### Cons\n")[-1]
.replace("\n", "")
.replace("-", "")
.strip()
)
cons = summary.split("\n\n### Cons\n")[-1].replace("\n", "").replace("-", "")

response = self.dynamodb_client.put_item(
TableName="game_generated_descriptions",
Expand Down
12 changes: 6 additions & 6 deletions modules/rag_description_generation/rag_weaviate.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ def create_weaviate_collection(self):

self.weaviate_client.collections.create(
name=self.collection_name,
# vectorizer_config=[
# Configure.NamedVectors.text2vec_transformers(
# name="title_vector",
# source_properties=["title"],
# )
# ],
vectorizer_config=[
Configure.NamedVectors.text2vec_transformers(
name="title_vector",
source_properties=["title"],
)
],
generative_config=wvc.config.Configure.Generative.openai(
model="gpt-4o-mini"
),
Expand Down

0 comments on commit 11daadc

Please sign in to comment.