core icon indicating copy to clipboard operation
core copied to clipboard

OpenDota Plugin for ChatGPT-4

Open hemenduroy opened this issue 1 year ago • 3 comments

Adding support for an OpenDota Plugin for ChatGPT4.

Requirements are detailed here, in the ChatGPT4 Plugin Documentation: https://platform.openai.com/docs/plugins/getting-started

Since I do not have access yet, I have not been able to test the plugin. I am currently on the waitlist. This plugin enables GPT4 to access the data made available to us through the OpenDota platform. When enabled, ChatGPT will automatically detect if the usage of the plugin is warranted based on the user's input. If yes, it will access data, draw conclusions and present a response to the user.

Notes

  1. Once Plugins is released (currently in Limited Alpha), I will have to Register the plugin before it can be used as described in Step 2 here: https://platform.openai.com/docs/plugins/introduction
  2. OpenAI documentation recommends only 1 or 2 endpoints be exposed at first, to limit the output size. In this PR, even though I have included ALL endpoints found here - https://www.opendota.com/api . I will be testing the plugin with only TWO endpoints initially, upon being granted access.

Usage Example (limited test using OpenAI API and the gpt-4 model)

image

I have only given it access to recent match data which is why it does not know what is hero_id 41 (npc_dota_hero_faceless_void) and it does not know what game_mode 22 and 23 are (probably all pick and turbo.)

Giving it access to more API routes when the plugin comes out should yield better responses as shown below.

Usage Example (theoretical):

User:

Answer this question as if you had an OpenDota Plugin with access to the OpenDota API. 
Use dummy values and examples to pretend : 

“My account id is ‘abc123xyz’, in match id ‘7378228’. 
What could I have done better? 
Base your answer on the opponent picks, team networth over time and item builds.”

GPT-4's response:

Based on the information provided, I've analyzed your performance in match id '7378228' 
with your account id 'abc123xyz' using the OpenDota API. 
Here's an overview of the game and some suggestions for improvement:

Game Overview:
Your team: Hero A, Hero B, Hero C, Hero D, Hero E
Enemy team: Hero F, Hero G, Hero H, Hero I, Hero J

Team Net Worth over Time:
Your team started strong, gaining an early lead in net worth. 
However, by mid-game, the enemy team managed to catch up and 
eventually surpassed your team's net worth. 
The lead fluctuated in the late game but ultimately, 
the enemy team maintained an advantage.

Item Builds:
Your hero: Hero A
Your items: Item 1, Item 2, Item 3, Item 4, Item 5, Item 6

Suggestions for Improvement:

Itemization: Analyzing your item build, it appears that you lacked 
sufficient lockdown against the enemy team's mobile heroes, like Hero F and Hero I. 
Instead of Item 4, consider purchasing a Scythe of Vyse to 
provide additional crowd control and disable their mobility during team fights.

Map control: The net worth graph indicates that your team lost map control during the mid-game. 
To maintain map control, prioritize placing aggressive 
Observer Wards in the enemy jungle and securing objectives such as towers and Roshan. 
Make sure to deward the enemy vision to hinder their map awareness.

Team fights: Based on the enemy team composition, 
it's crucial to focus on their key damage dealers, like Hero G and Hero J. 
Coordinate with your teammates to initiate on high-priority targets 
and use your abilities effectively to disrupt the enemy backline.

Farm efficiency: The net worth graph suggests that 
your team fell behind in farm during the mid-game. 
To maintain a gold advantage, ensure that your cores are farming efficiently 
and avoid taking unfavorable engagements. 
As a support, stack neutral camps and create space for your cores to farm safely.

Adaptability: As the game progresses, keep an eye on the enemy team's item builds 
and adjust your strategy accordingly.
For example, if Hero H built a Black King Bar, 
prioritize using your disables on other targets or 
wait for the spell immunity to expire before engaging.

By focusing on these areas of improvement, 
you can increase your chances of success in future matches. 
Keep practicing and learning from your experiences to enhance your gameplay.

Moreover, along with the ChatGPT Retrieval Plugin (https://github.com/openai/chatgpt-retrieval-plugin), and access to Steam Guides (It would be a good idea to only feed it recommended guides such as those by Torte de Lini and ImmortalFaith), this plugin could make GPT-4 a powerhouse of knowledge and insights for any user.

hemenduroy avatar Mar 24 '23 22:03 hemenduroy

Pretty cool idea

ff137 avatar Jun 17 '23 15:06 ff137

is this issue still relevant, integration of chatGPT to generate post match summary is a really exciting feature

jzhao62 avatar Aug 04 '23 11:08 jzhao62

is this issue still relevant, integration of chatGPT to generate post match summary is a really exciting feature

Id love to see this through but unfortunately, I have not been given access to develop plugins even though I’ve been on the waitlist for months now :(

hemenduroy avatar Aug 04 '23 14:08 hemenduroy