mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-09 13:17:55 -05:00
add telemetry tracking if it is complex app
This commit is contained in:
@@ -16,6 +16,7 @@ The telemetry data we collect includes:
|
||||
- **GPT Pilot Version**: The version of GPT Pilot you are using.
|
||||
- **LLM Model**: LLM model used for the session.
|
||||
- **Time**: How long it took to generate a project.
|
||||
- **Initial prompt**: App description used to create app (after Specification Writer Agent).
|
||||
|
||||
All the data points are listed in [pilot.utils.telemetry:Telemetry.clear_data()](../pilot/utils/telemetry.py).
|
||||
|
||||
|
||||
@@ -199,6 +199,7 @@ class Project:
|
||||
|
||||
print('', type='verbose', category='agent:product-owner')
|
||||
self.project_manager.get_project_description(self.spec_writer)
|
||||
telemetry.set("initial_prompt", self.project_description)
|
||||
print({ "project_description": self.project_description }, type='projectDescription')
|
||||
self.project_manager.get_user_stories()
|
||||
# self.user_tasks = self.project_manager.get_user_tasks()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from helpers.AgentConvo import AgentConvo
|
||||
from helpers.Agent import Agent
|
||||
from utils.files import count_lines_of_code
|
||||
from utils.telemetry import telemetry
|
||||
from utils.style import color_green_bold, color_yellow_bold
|
||||
from prompts.prompts import ask_user
|
||||
from const.messages import AFFIRMATIVE_ANSWERS
|
||||
@@ -96,6 +96,7 @@ class SpecWriter(Agent):
|
||||
|
||||
def create_spec(self, initial_prompt):
|
||||
self.project.is_complex_app = self.check_app_complexity(initial_prompt)
|
||||
telemetry.set("is_complex_app", self.project.is_complex_app)
|
||||
if len(initial_prompt) > 1500 or not self.project.is_complex_app:
|
||||
return initial_prompt
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ def exit_gpt_pilot(project, ask_feedback=True):
|
||||
path_id = get_path_id()
|
||||
|
||||
if ask_feedback:
|
||||
ask_to_store_prompt(project, path_id)
|
||||
# ask_to_store_prompt(project, path_id)
|
||||
ask_user_email(project)
|
||||
|
||||
# TODO: Turned off for now because we're asking for email, and we don't want to
|
||||
|
||||
@@ -92,6 +92,8 @@ class Telemetry:
|
||||
"app_id": None,
|
||||
# Project architecture
|
||||
"architecture": None,
|
||||
# Is complex app
|
||||
"is_complex_app": None,
|
||||
}
|
||||
if sys.platform == "linux":
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user