Alexvatti commited on
Commit
c870a6d
·
verified ·
1 Parent(s): f3dca2b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -53,7 +53,7 @@ llm = ChatOpenAI(
53
  # Function to generate a more appropriate name based on content
54
  def generate_name_based_on_content(text,industry):
55
  prompt = f"Generate a meaningful file name for the following content: {text[:200]} based {industry}" # Truncate text to first 200 characters
56
- response = llm(prompt) # Get the model's response
57
 
58
  # Extract the generated file name and clean it
59
  file_name = response.strip() # Strip any unnecessary whitespace or characters
 
53
  # Function to generate a more appropriate name based on content
54
  def generate_name_based_on_content(text,industry):
55
  prompt = f"Generate a meaningful file name for the following content: {text[:200]} based {industry}" # Truncate text to first 200 characters
56
+ response = llm([HumanMessage(content=prompt)]).content
57
 
58
  # Extract the generated file name and clean it
59
  file_name = response.strip() # Strip any unnecessary whitespace or characters