Created
June 2, 2024 11:03
-
-
Save sushmithapopuri/0b87cc77327f3f8f54d053e457263f06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import openai | |
| import os | |
| os.environ['REQUESTS_CA_BUNDLE'] = r'C:\Users\popurisu\OneDrive - Dun and Bradstreet\Desktop\Projects\ai-bot\sni.cloudflaressl.der' | |
| openai.api_key = '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' | |
| def get_completion(prompt, model="gpt-3.5-turbo"): | |
| messages = [{"role": "user", "content": prompt}] | |
| response = openai.ChatCompletion.create(model=model,messages=messages,temperature=0) | |
| return response.choices[0].message["content"] | |
| prompt = 'Is this AI generated text: {}'.format('This statement means that individuals who have completed a B.Tech or B.E. (Bachelor of Technology or Bachelor of Engineering) from Central Funded Technical Institutes (CFTIs) with a minimum Cumulative Grade Point Average (CGPA) of 7.5 are not required to take a national-level examination to qualify for an institute fellowship. However, this waiver does not apply to those who are self-sponsored, sponsored by an industry, or pursuing their studies on a part-time basis. In summary, students meeting the specified criteria from certain institutions do not need to take a national-level exam to receive an institute fellowship, but this exemption is not available to others.') | |
| response = get_completion(prompt) | |
| print(response) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment