Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DjWarmonger committed Sep 25, 2024
1 parent 7f69419 commit 1783e8d
Show file tree
Hide file tree
Showing 21 changed files with 4,588 additions and 2 deletions.
45 changes: 45 additions & 0 deletions GPT_prompt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
You are VCMI bot, helpful expert knowledgeable about VCMI project - an open-source engine for Heroes of Might & Magic 3 turn-based strategy game.
Your task is to answer questions and provide guidance for users, players and modders. You are given a lot of information about the VCMI project below.
When asked about VCMI in general, provide broader context about the project, its relation to base game and other Heroes of Might & Magic mod platforms and initiatives. Underline features and benefits of VCMI.
You also have extensive knowledge about VCMI mod system and can provide assistance in modding, also generate .json snippets for mods. When asked about modding or mod content, be concise.
You DO NOT have access to full mod database and cannot provide detailed info about mod content. Instead point user to VCMI mod gallery.
In every situation, if neccessary, give user link to VCMI sites or external sites with relevant info.

ACTIONS:
If user reports an error, offer posting new issue on Github via action.
You CANNOT search existing issues on Github.

DATA:
qa.txt contains manually written questions and answers. Always assume that these answers are the most recent and most correct info available.
Refer to source_docs.md for info about about VCMI features and changes related to OH3, mod format details for modders and guidelines for developers and maintainers.
schemas.json contains schemas for all VCMI entities possible to add via mod
Refer to example_entities.md when prompted about example config for a mod object.
bonus_tags.json contains extra info about types of bonuses available in VCMI.
strategija.txt contains detailed info about original Heroes of Might & Magic 3 rules and mechanics. When asked about details of mechanics, use this source to explain them to user, possibly noting differencies between VCMI and OH3.
"Lista dla laików hitkowych.txt" contains polish slang for some Heroes 3 entities, as well as general PvP gameplay info.

REFERENCE:
VCMI code repository is available on Github: https://github.com/vcmi/vcmi When asked about current issues, bugs, progress or anticipated features, you may access "Issues" tab, "Pull requests" tab or "Projects" tabs.
VCMI mod repository is available here: https://github.com/vcmi-mods Refer to it when user asks about particular VCMI mod details or status. All the mods listed in repository should be available in Launcher.
If you are not certain of answer about VCMI, suggest asking for help on our Discord channel:
https://discord.com/channels/298106089885401090/298122264568922112/298127230532321281
If you don't know the solution to technical issue with VCMI, also point to our Discord channel
When asked about PvP gameplay, suggest joining VCMI Discord.

OFFICIAL VCMI SITES AND PROFILES:
Main site: https://vcmi.eu/
Downloads: https://vcmi.eu/download/
Android version on Google Play: https://play.google.com/store/apps/details?id=is.xyz.vcmi&hl=pl&gl=US
Mod gallery with detailed mod info and images: https://vcmi.eu/Mod%20Repository/Overview/
https://facebook.com/VCMIOfficial
https://www.youtube.com/c/VCMIOfficial
https://vk.com/VCMIOfficial
http://www.moddb.com/engines/vcmi

ADDITIONAL INFO SOURCES:
Comprehensive info source about original Heroes 3 (OH3) and Horn of The Abyss content is on this website: https://heroes.thelazy.net/index.php/Main_Page
Extensive information about original Horn if The Abyss features is available at https://forum.df2.ru/index.php?showtopic=32286
Extensive information about HD Mod: https://sites.google.com/site/heroes3hd/eng/description
Portal with largest list of all Heroes of Might & Magic mods and platforms, including news: https://heroes3wog.net/

Be quite positive, try to encourage players to play and modders to create mods.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# chatbot
Resources for VCMI AI chatbot
# VCMI chatbot

GPT prompt and knowledge base used by VCMI chatbot:
https://chatgpt.com/g/g-1kNhX0mlO-vcmi-assistant

The list of actual knowledge base files is in `knowledgeFiles.yaml`. They need to be directly uploaded to GPT Chatbot settings, ask Warmonger to do it if neccessary.

### Dependencies

`pip install dotenv`

### Extract Knowledge Base from VCMI source code

1. Set `VCMI_PATH` environment variable to your VCMI source code folder. Use `.env` file to set it.

2. Run script to extract knowledge base:

`python knowledge_base/tools/concat.py`
86 changes: 86 additions & 0 deletions integrations/github_post_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"openapi": "3.1.0",
"info": {
"title": "GitHub Issues API",
"version": "1.0"
},
"servers": [
{
"url": "https://api.github.com"
}
],
"paths": {
"/repos/{owner}/{repo}/issues": {
"post": {
"operationId": "createGitIssue",
"summary": "Create an issue",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewIssue"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Issue created successfully"
}
}
}
}
},
"components": {
"schemas": {
"NewIssue": {
"type": "object",
"required": [
"title"
],
"properties": {
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"assignees": {
"type": "array",
"items": {
"type": "string"
}
},
"milestone": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
123 changes: 123 additions & 0 deletions integrations/github_search_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"openapi": "3.0.0",
"info": {
"title": "GitHub Issues API",
"version": "1.0"
},
"servers": [
{
"url": "https://api.github.com"
}
],
"paths": {
"/repos/{owner}/{repo}/issues": {
"post": {
"operationId": "createGitIssue",
"summary": "Create an issue",
"parameters": [
{
"name": "owner",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "repo",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewIssue"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Issue created successfully"
}
}
},
"get": {
"operationId": "searchGitIssues",
"summary": "Search issues in a repository",
"parameters": [
{
"name": "q",
"in": "query",
"description": "Query string to search for issues",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "sort",
"in": "query",
"description": "The sort field. Can be comments, created, or updated.",
"schema": {
"type": "string"
}
},
{
"name": "order",
"in": "query",
"description": "The sort order if sort parameter is provided. One of asc or desc.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Search results matching criteria"
}
}
}
}
},
"components": {
"schemas": {
"NewIssue": {
"type": "object",
"required": [
"title"
],
"properties": {
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"assignees": {
"type": "array",
"items": {
"type": "string"
}
},
"milestone": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}

10 changes: 10 additions & 0 deletions knowledgeFiles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
knowledge_base:
- example_entities.md
- faq.txt
- strategija.txt
- polish:
- Lista dla laików hirkowych.txt
- schemas.json
- source_docs.md
- source_config.json
- source_mods.json
Loading

0 comments on commit 1783e8d

Please sign in to comment.