GithubHelp home page GithubHelp logo

sahilkamate03 / docgpt Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 478 KB

ChatGPT trained on Accops Documentation.

Home Page: https://docs.accops.com/

Python 92.72% HTML 7.28%
chatbot chatgpt-api flask

docgpt's Introduction

Readme: Using OpenAI's GPT model

This code demonstrates how to import OpenAI's API key and use their GPT model for text generation.

Importing OpenAI

At the beginning of the code, the openai module is imported to authenticate and authorize access to OpenAI's GPT model.

Using the GPT model

The model variable specifies the GPT model to be used for text generation. The code uses the while loop to listen for user input and generate text based on the input using OpenAI's GPT model. The generated text is stored in the response variable and is displayed to the user using the print statement.

Parameters

The text generation process can be controlled using various parameters:

  • temperature controls the "creativity" of the generated text. Higher temperatures lead to more varied and unexpected responses, while lower temperatures lead to more conservative and predictable responses.

  • top_p controls the diversity of the generated text by setting a threshold for the cumulative probability of the most likely words.

  • max_tokens sets the maximum number of tokens (words) that the GPT model will generate.

  • frequency_penalty and presence_penalty control the frequency of repetition of words and phrases in the generated text.

Running the code

To run the code go to model folder and type python main.py. Note : Before running the program setup the .env in the same folder.

docgpt's People

Contributors

sahilkamate03 avatar

Stargazers

Shantanu Rajmane avatar

Watchers

 avatar

Forkers

mayank13579

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.