acpotts commited on
Commit
337cc6c
·
1 Parent(s): e92ea01

add api_key variable

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -50,7 +50,8 @@ class RetrievalAugmentedQAPipeline:
50
  return {"response": generate_response(), "context": context_list}
51
 
52
  # text_splitter = RecursiveCharacterTextSplitter()
53
- text_splitter = SemanticChunker(OpenAIEmbeddings(), breakpoint_threshold_type="standard_deviation")
 
54
 
55
  def process_text_file(file: AskFileResponse):
56
  import tempfile
 
50
  return {"response": generate_response(), "context": context_list}
51
 
52
  # text_splitter = RecursiveCharacterTextSplitter()
53
+ api_key = os.getenv("OPENAI_API_KEY")
54
+ text_splitter = SemanticChunker(OpenAIEmbeddings(api_key=api_key), breakpoint_threshold_type="standard_deviation")
55
 
56
  def process_text_file(file: AskFileResponse):
57
  import tempfile