🤖CyberAI is designed to bridge the world of Cyberpunk 2077 and the power of OpenAI's AI technology.

Overview

CyberAI

🤖 Welcome to the CyberAI project! This plugin for Cyberpunk 2077 enables integration between the videogame and OpenAI API, opening a world of possibilities for enhancing the gameplay experience. With this plugin, you can call OpenAI API methods directly from the scripting level.

Plugin development is still in progress. 🚧

bg

Installation 🔧

  1. Download the zip from the latest release
  2. Move CyberAI.dll and Settings.json to red4ext\plugins\CyberAI
  3. Open Settings.json and paste your OpenAI API key and organization id
  4. If you would access to the plugin's functions from CET console, you need to move CyberAI.reds to r6\scripts\CyberAI

Usage 💻

Redscript

Ask GPT to generate an answer for you:

native func ScheduleChatCompletionRequest(chat_id: String, messages: array<array<String>>);

ScheduleChatCompletionRequest("your_custom_id", {{"System", "Speak as ..."}, {"User", "How are you?"}});

ScheduleChatCompletionRequest("your_custom_id", {{"User", "My name is V"}, {"User", "How are you and what's my name?"}});

You can collect your request and an answer when it is done:

native func GetAnswer(chat_id: String) -> String;
native func GetRequest(chat_id: String) -> String;

LogChannel(n"DEBUG", GetAnswer("your_custom_id"));
LogChannel(n"DEBUG", GetRequest("your_custom_id"));

You can iterate through the chat history, or you can get it as a string:

native func GetHistory(chat_id: String) -> array<array<String>>;
native func GetHistoryAsString(chat_id: String) -> String;

LogChannel(n"DEBUG", GetHistoryAsString("your_custom_id"));

let history = GetHistory(chat_id);
for completion in history {
    LogChannel(n"DEBUG", "Role: " + ToString(completion[0]) + "\nMessage: " + ToString(completion[1]));
}

Flushing a chat:

native func FlushChat(chat_id: String);

FlushChat("your_custom_id");

You need to put your generated custom string ID in almost all functions. CyberAI will provide a new chat for every unique ID and keep the chat history.

⚠️ Whenever you request to chat, all the chat history also sends to OpenAI API.

Future Plans 🚀

  • Eleven Labs Integration: We plan to integrate with Eleven Labs to provide text-to-speech functionality, allowing the AI to generate audio responses in addition to text.

  • InWorld AI Integration: We are exploring the possibility of integrating with InWorld AI, a powerful AI engine for creating characters. This could allow for even more dynamic and responsive AI characters in the game.

Inspiration 💡

With this plugin, the possibilities are almost limitless. Here are just a few examples of what you can script with it:

  • AI-NPC Dialogue: Use OpenAI's GPT to generate unique dialogue for non-player characters (NPCs), increasing the diversity and richness of in-game interactions.

  • Dynamic Plot Generation: Use OpenAI to generate unique storylines or side quests based on in-game events or player actions.

  • Procedural Mission Planning: Generate procedural missions based on context, NPC data, and player preferences using AI.

  • Interactive Environment: Use AI to generate dynamic responses from the environment, making your exploration of Night City even more immersive.

  • Intelligent Enemy Tactics: AI could control enemy tactics based on the player's strategy and actions, making combat more challenging and unpredictable.

Remember, these are just examples, and the only limit is your imagination!

Credits 🔗

This project would not be possible without the following projects:

  • red4ext-rs: A Rust binding for RED4ext, which provides an API to interact with the internals of Cyberpunk 2077.

  • async-openai: An asynchronous, modern Rust library for OpenAI API.

  • OpenAI API: OpenAI offers a general-purpose "text in, text out" interface, making it possible to use language models like GPT-3 in a wide range of applications.

License 🔖

This project is licensed under the terms of the MIT License. See the LICENSE file in the project's root directory for more details.

Enjoy exploring the new world of Cyberpunk 2077 with the power of AI! 🎮 🕹️


You might also like...
Crypto in, power out

Cipo Crypto in, power out Cipo makes it easy to let users pay for electricity for their camper-van, electric cars, boat, caravan and other high load c

The free password manager for power users
The free password manager for power users

The free password manager for power users

Harness the power of signify(1) to sign arbitrary git objects

git-signify A tool to sign arbitrary objects in a git repository. Generating keys Signing keys can be generated with signify, from the OpenBSD project

Diem’s mission is to build a trusted and innovative financial network that empowers people and businesses around the world.
Diem’s mission is to build a trusted and innovative financial network that empowers people and businesses around the world.

Note to readers: On December 1, 2020, the Libra Association was renamed to Diem Association. The project repos are in the process of being migrated. A

Diem’s mission is to build a trusted and innovative financial network that empowers people and businesses around the world.
Diem’s mission is to build a trusted and innovative financial network that empowers people and businesses around the world.

Note to readers: On December 1, 2020, the Libra Association was renamed to Diem Association. The project repos are in the process of being migrated. A

hello-world geyser plugin to stream accounts and transactions from a solana node

src/lib.rs: entrypoint src/plugin.rs: main plugin code to run: cargo build && solana-test-validator -r --geyser-plugin-config config.json note: make s

Benson Box built on Substrate for a world UNcorporated.

Benson Box built on Substrate. For getting started and technical guides, please refer to the Benson Wiki.

The protocol are designed and made for the future of cross-IP, cross-chain metaverse.

Avatar-protocol 化身协议 This project demonstrates how to use the Solana Javascript API to interact with programs on the Solana blockchain. The project co

An uploader honeypot designed to look like poor website security.

HoneyUp An uploader honeypot designed to look like poor website security. Requirements Linux server NGiNX Rust toolchain (build only) Installation Bui

Comments
  • Improve suggestions

    Improve suggestions

    Use an dictionary that have identifier as key and value is item with request field and answer field.

    So using it in cet will be like

    ScheduleChatCompletionRequest("my identifier",{{"User", "You are being launched in the videogame Cyberpunk2077. How are you feeling?"}});

    GetLastAnswerContent("my identifier") GetLastRequestContent("my identifier")

    opened by donk7413 7
Releases(v0.1.0)
Owner
Kirill Kuzin
Kirill Kuzin
Bespoke toolkit for Non-fungible token (NFT) technology 🚀

Bespoke toolkit for Non-fungible token (NFT) technology ?? What is Onft? Instead of forcing a consensus algorithm or peer networking on you, Onft prov

Owez 5 Jan 9, 2022
Experiments on blockchain technology (also known as Hashed & Zero-trust Verifiable Linked List)

AngeloChain Experiments on blockchain technology (also known as Hashed & Zero-trust Verifiable Linked List) ⚠️ Before We Get Started Before we get sta

Angelo 1 Jan 20, 2022
Terabethia - A Bridge and Messaging Protocol between Ethereum and the Internet Computer.

Terabethia - A Bridge Between Ethereum & the Internet Computer Terabethia is a bridge between Ethereum & the Internet Computer that contracts in both

Psychedelic 36 Dec 26, 2022
Simple node and rust script to achieve an easy to use bridge between rust and node.js

Node-Rust Bridge Simple rust and node.js script to achieve a bridge between them. Only 1 bridge can be initialized per rust program. But node.js can h

Pure 5 Apr 30, 2023
The Phala Network Blockchain, pRuntime and the bridge.

Phala Blockchain Phala Network is a TEE-Blockchain hybrid architecture implementing Confidential Contract. This repo includes: node/: the main blockch

Phala Network 314 Jan 6, 2023
A value transfer bridge between the Monero blockchain and the Secret Network.

Secret-Monero-Bridge A value transfer bridge between the Monero blockchain and the Secret Network. Proof-of-Concept Video Demonstration: https://ipfs.

null 28 Dec 7, 2022
Filecoin to substrate bridge

filecoindot A Substrate pallet to bridge from Filecoin to any blockchain built using the Substrate framework, including Polkadot parachains. How to in

ChainSafe 23 Nov 23, 2022
Cross-chain bridge message delivery network. We are hiring, [email protected]

Introduction Implementation of a https://darwinia.network node in Rust based on the Substrate framework. This repository contains runtimes for the Dar

Darwinia Network 225 Nov 8, 2022
A bridge between different serde implementations.

serde-bridge   Bridge between serde types Quick Start use anyhow::Result; use serde_bridge::{from_value, into_value, FromValue, IntoValue, Value}; fn

Xuanwo 14 Nov 24, 2022
interBTC A trust-minimized bridge from Bitcoin to Polkadot.

interBTC A trust-minimized bridge from Bitcoin to Polkadot. Explore the specification » Report Bug · Request Feature This repository is hosted on GitH

Interlay 192 Dec 27, 2022