naveenvenkatesh commited on
Commit
0c0ecb2
1 Parent(s): 324987f

Update pdftojson.py

Browse files
Files changed (1) hide show
  1. pdftojson.py +2 -2
pdftojson.py CHANGED
@@ -2,7 +2,7 @@ import os
2
  import PyPDF2
3
  import logging
4
  from langchain import PromptTemplate, LLMChain
5
- from langchain.llms import OpenAI
6
 
7
  # Configure logging
8
  logging.basicConfig(
@@ -49,7 +49,7 @@ class PdftoJson:
49
  LOGGER.info("Generating JSON result by analyzing input text...")
50
 
51
  # Initialize the OpenAI language model with specified settings
52
- llm = OpenAI(temperature=0, max_tokens=1000)
53
 
54
  # Define a template that instructs the model to split input text into topics and content
55
  template = """
 
2
  import PyPDF2
3
  import logging
4
  from langchain import PromptTemplate, LLMChain
5
+ from langchain_openai import AzureChatOpenAI
6
 
7
  # Configure logging
8
  logging.basicConfig(
 
49
  LOGGER.info("Generating JSON result by analyzing input text...")
50
 
51
  # Initialize the OpenAI language model with specified settings
52
+ llm = AzureChatOpenAI(azure_deployment = "ChatGPT")
53
 
54
  # Define a template that instructs the model to split input text into topics and content
55
  template = """