Docfile commited on
Commit
10afc60
·
verified ·
1 Parent(s): 540d8fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -4,6 +4,7 @@ from langchain_google_genai import ChatGoogleGenerativeAI
4
  from langchain import LLMChain, PromptTemplate
5
  from langchain.memory import ConversationBufferMemory
6
  from langchain_google_genai import (
 
7
  HarmBlockThreshold,
8
  HarmCategory,
9
  )
@@ -38,11 +39,8 @@ memory = ConversationBufferMemory(memory_key="chat_history")
38
  llm_chain = LLMChain(
39
  llm=ChatGoogleGenerativeAI(model="gemini-1.5-flash-lastest"),
40
  safety_settings={
41
- HarmCategory.HARM_CATEGORY_HARASSMENT: HarmBlockThreshold.BLOCK_NONE,
42
- HarmCategory.HARM_CATEGORY_HATE_SPEECH: HarmBlockThreshold.BLOCK_NONE,
43
- HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: HarmBlockThreshold.BLOCK_NONE,
44
- HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE,
45
- },
46
  prompt=prompt,
47
  verbose=True,
48
  memory=memory,
 
4
  from langchain import LLMChain, PromptTemplate
5
  from langchain.memory import ConversationBufferMemory
6
  from langchain_google_genai import (
7
+ ChatGoogleGenerativeAI,
8
  HarmBlockThreshold,
9
  HarmCategory,
10
  )
 
39
  llm_chain = LLMChain(
40
  llm=ChatGoogleGenerativeAI(model="gemini-1.5-flash-lastest"),
41
  safety_settings={
42
+ HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE,
43
+ },
 
 
 
44
  prompt=prompt,
45
  verbose=True,
46
  memory=memory,