mirror of
https://github.com/yuruotong1/autoMate.git
synced 2026-03-22 04:57:18 +08:00
update agent
This commit is contained in:
@@ -4,8 +4,8 @@ Conversation manager module for handling dialog flow and states
|
||||
import json
|
||||
import time
|
||||
from PyQt6.QtCore import QObject, QThread, QTimer
|
||||
|
||||
from src.core.input_listener import InputListener
|
||||
from xbrain.core.chat import run
|
||||
|
||||
|
||||
class ConversationManager(QObject):
|
||||
@@ -98,8 +98,9 @@ class ConversationManager(QObject):
|
||||
|
||||
# Format display based on action type
|
||||
if action["type"] == "mouse":
|
||||
status_text = f"Mouse action: {action['event']} at position: {action['position']}"
|
||||
|
||||
self.text_buffer = ""
|
||||
|
||||
elif action["type"] == "keyboard":
|
||||
current_time = time.time()
|
||||
|
||||
|
||||
10
src/core/few_shot_agent.py
Normal file
10
src/core/few_shot_agent.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from pdb import run
|
||||
from typing import Any
|
||||
|
||||
|
||||
class FewShotAgent:
|
||||
def __init__(self):
|
||||
self.messages = []
|
||||
|
||||
def __call__(self, *args: Any, **kwds: Any) -> Any:
|
||||
pass
|
||||
@@ -5,6 +5,7 @@ import sys
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
|
||||
from src.ui.main_window import MainWindow
|
||||
from xbrain.utils.config import Config
|
||||
|
||||
|
||||
def main():
|
||||
@@ -13,6 +14,12 @@ def main():
|
||||
|
||||
Creates and runs the AutoMate application
|
||||
"""
|
||||
config = Config()
|
||||
base_url = "https://api.openai-next.com/v1"
|
||||
api_key = "sk-fb4R0ieuTV2OISKX715e7e4a588447F0A6A0AaE6123d16C7"
|
||||
model = "gpt-4o"
|
||||
config.set_openai_config(base_url=base_url, api_key=api_key, model=model)
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
window = MainWindow()
|
||||
window.show()
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
Input area component for user message entry
|
||||
"""
|
||||
from PyQt6.QtWidgets import (QWidget, QTextEdit, QPushButton, QHBoxLayout, QVBoxLayout)
|
||||
from PyQt6.QtCore import Qt, pyqtSignal
|
||||
from PyQt6.QtGui import QFont, QColor
|
||||
|
||||
|
||||
class InputArea(QWidget):
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
Main application window for the AutoMate interface
|
||||
"""
|
||||
from PyQt6.QtWidgets import QMainWindow, QWidget, QHBoxLayout, QVBoxLayout, QApplication
|
||||
from PyQt6.QtCore import Qt
|
||||
|
||||
from src.ui.chat_area import ChatArea
|
||||
from src.ui.input_area import InputArea
|
||||
from src.ui.profile_widget import ProfileWidget
|
||||
|
||||
@@ -3,7 +3,7 @@ Message widget components for chat interface
|
||||
"""
|
||||
from PyQt6.QtWidgets import (QWidget, QLabel, QHBoxLayout, QVBoxLayout)
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtGui import QFont, QColor, QPalette
|
||||
from PyQt6.QtGui import QFont
|
||||
|
||||
|
||||
class MessageWidget(QWidget):
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Profile widget component for displaying intern information
|
||||
"""
|
||||
import os
|
||||
from PyQt6.QtWidgets import (QWidget, QLabel, QVBoxLayout, QHBoxLayout)
|
||||
from PyQt6.QtWidgets import (QWidget, QLabel, QVBoxLayout)
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtGui import QFont, QPixmap, QColor, QPainter, QPen
|
||||
|
||||
|
||||
Reference in New Issue
Block a user