Skip to content

Commit

Permalink
Fixed missed comma
Browse files Browse the repository at this point in the history
  • Loading branch information
JackColquitt authored and cybermaggedon committed Oct 9, 2024
1 parent b98e553 commit 6bfa01d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion trustgraph-flow/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"openai",
"neo4j",
"tiktoken",
"google-generativeai"
"google-generativeai",
],
scripts=[
"scripts/chunker-recursive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ def __init__(self, **params):
"response_mime_type": "text/plain",
}

block_level = HarmBlockThreshold.BLOCK_ONLY_HIGH

self.safety_settings={
HarmCategory.HARM_CATEGORY_HATE_SPEECH: HarmBlockThreshold.BLOCK_ONLY_HIGH,
HarmCategory.HARM_CATEGORY_HARASSMENT: HarmBlockThreshold.BLOCK_ONLY_HIGH,
HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: HarmBlockThreshold.BLOCK_ONLY_HIGH,
HarmCategory.HARM_CATEGORY_DANGEROUS: HarmBlockThreshold.BLOCK_ONLY_HIGH,
HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY: HarmBlockThreshold.BLOCK_ONLY_HIGH,
HarmCategory.HARM_CATEGORY_HATE_SPEECH: block_level,
HarmCategory.HARM_CATEGORY_HARASSMENT: block_level,
HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: block_level,
HarmCategory.HARM_CATEGORY_DANGEROUS: block_level,
HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY: block_level,
}

self.llm = genai.GenerativeModel(
Expand Down

0 comments on commit 6bfa01d

Please sign in to comment.