ThireshS commited on
Commit
5c886b9
·
verified ·
1 Parent(s): 072d156

Update src/workflow_nodes.py

Browse files
Files changed (1) hide show
  1. src/workflow_nodes.py +6 -4
src/workflow_nodes.py CHANGED
@@ -32,14 +32,16 @@ from workflow_utils import (
32
 
33
 
34
 
35
- # Setting up LLM
 
 
36
 
37
- # Setting up LLM
38
 
 
39
  ## Create a ChatOpenAI model instance using LangChain
40
  model = ChatOpenAI(
41
- openai_api_base="https://aibe.mygreatlearning.com/openai/v1",
42
- openai_api_key="gl-U2FsdGVkX187N1eV0CyPv1sUJRNjeg+05MCul6Lf06cDym4PRicIyZ4g0RtQUSMl",
43
  model="gpt-4o",
44
  streaming=False # Explicitly disabling streaming
45
  )
 
32
 
33
 
34
 
35
+ # Fetch secrets from Hugging Face Spaces
36
+ api_key = os.environ['AZURE_OPENAI_KEY']
37
+ endpoint = os.environ['AZURE_OPENAI_ENDPOINT']
38
 
 
39
 
40
+ # Setting up LLM
41
  ## Create a ChatOpenAI model instance using LangChain
42
  model = ChatOpenAI(
43
+ openai_api_base= api_key,
44
+ openai_api_key= endpoint,
45
  model="gpt-4o",
46
  streaming=False # Explicitly disabling streaming
47
  )