Code Monkey home page Code Monkey logo

dot4gpt's Introduction

Dot 4 GPT

This program works with Left 4 GPT to make the L4D2 survivor bots talk with you via chat using ChatGPT.

Here you can see it in action:

https://www.youtube.com/watch?v=as2hVSjyxQs

https://www.youtube.com/watch?v=WfKeQNPIYVI

The program is a .NET console application written in C# you can easily recompile with Visual Studio, if you want.

It must run on the same machine of the L4D2 server, which in case of you hosting the game it's your PC but it can also run on Windows/Linux (tested on Ubuntu Server 22.04) dedicated servers, if your hosting provider allows you to do so. The .NET 6.0 runtimes must be installed.

How to run

You need to run one instance of the program for each bot you want to talk. The bot name must be added as command line parameter.

  • Windows
Dot4GPT.exe nick
  • Linux
dotnet ./Dot4GPT.dll nick

The user you use to run the program must have r/w access to the L4D2 server's ems directory.

So you may want to use the same user you use to run the L4D2 server.

Settings

The first time you run the program, it terminates after creating its default settings file settings.json, which appears like this:

{"ApiKey":"","IOPath":"C:\\Program Files (x86)\\Steam\\steamapps\\common\\Left 4 Dead 2\\left4dead2\\ems\\left4gpt","MaxTokens":50,"MaxContext":10,"ResetIdleSeconds":90,"APIErrors":false}

You must add your OpenAI API Key and change the path to the ems\left4gpt folder (if needed), then run it again.

  • ApiKey (your OpenAI API Key)
  • IOPath (full path to the ems\left4gpt folder)
  • MaxTokens (max number of tokens used by the API in a single API call)
  • MaxContext (the program keeps a list of max this amount of latest messages as context for the AI)
  • ResetIdleSeconds (after how long of no messages to this bot the program will reset the context)
  • APIErrors (true = if the API call fails, the error message is used as reply. false = the message "Sorry what?" will be used instead)

dot4gpt's People

Contributors

smilz0 avatar

Stargazers

Thomas Marsh avatar  avatar That Annoying Guide avatar

Watchers

Kostas Georgiou avatar  avatar  avatar

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.