github-actions[bot] commited on
Commit
ee15403
·
1 Parent(s): 6d00da9

🤖 Auto-deploy from GitHub (push) - efa3cca - 2025-08-11 10:17:41 UTC

Browse files
apps/gradio-app/src/fitness_gradio/ui/handlers.py CHANGED
@@ -658,7 +658,7 @@ Please check your API keys and try a different model."""
658
 
659
  if "training_plan" in content.lower() and "meal_plan" in content.lower():
660
  # Import here to avoid circular imports
661
- from fitness_core.agents.models import FitnessPlan
662
 
663
  # Simple parsing - this can be enhanced based on actual output format
664
  lines = content.split('\n')
 
658
 
659
  if "training_plan" in content.lower() and "meal_plan" in content.lower():
660
  # Import here to avoid circular imports
661
+ from fitness_core.agents.agent_models import FitnessPlan
662
 
663
  # Simple parsing - this can be enhanced based on actual output format
664
  lines = content.split('\n')
shared/src/fitness_core/agents/__init__.py CHANGED
@@ -2,7 +2,7 @@
2
  Agents module for the fitness core library.
3
  """
4
  from .fitness_agent import FitnessAgent
5
- from .models import AgentResponse, ConversationMessage, AgentConfig
6
  from .fitness_plan_model import FitnessPlan
7
  from .providers import ModelProvider
8
 
 
2
  Agents module for the fitness core library.
3
  """
4
  from .fitness_agent import FitnessAgent
5
+ from .agent_models import AgentResponse, ConversationMessage, AgentConfig
6
  from .fitness_plan_model import FitnessPlan
7
  from .providers import ModelProvider
8
 
shared/src/fitness_core/agents/agent_models.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Pydantic models for the fitness agent.
3
+ """
4
+ from pydantic import BaseModel, Field
5
+ from typing import Optional, List
6
+ from datetime import datetime, date
7
+
8
+
9
+ class AgentResponse(BaseModel):
10
+ """Standard agent response format."""
11
+ content: str
12
+ metadata: Optional[dict] = None
13
+
14
+
15
+ class ConversationMessage(BaseModel):
16
+ """Individual conversation message."""
17
+ role: str # "user" or "assistant"
18
+ content: str
19
+ timestamp: Optional[str] = None
20
+
21
+
22
+ class AgentConfig(BaseModel):
23
+ """Configuration for the fitness agent."""
24
+ model_name: str
25
+ temperature: Optional[float] = 0.7
26
+ max_tokens: Optional[int] = None
27
+ custom_instructions: Optional[str] = None
shared/src/fitness_core/agents/fitness_agent.py CHANGED
@@ -6,7 +6,7 @@ from datetime import datetime
6
  from agents import Agent
7
  from dotenv import load_dotenv
8
 
9
- from .models import AgentConfig
10
  from .providers import ModelProvider
11
  from .tools import get_tool_functions, get_combined_instructions
12
  from .user_session import SessionManager, UserProfile
 
6
  from agents import Agent
7
  from dotenv import load_dotenv
8
 
9
+ from .agent_models import AgentConfig
10
  from .providers import ModelProvider
11
  from .tools import get_tool_functions, get_combined_instructions
12
  from .user_session import SessionManager, UserProfile
shared/src/fitness_core/agents/providers.py CHANGED
@@ -3,7 +3,7 @@ AI model provider management and configuration.
3
  """
4
  import os
5
  from typing import Dict, List, Tuple, Optional
6
- from .models import AgentConfig
7
 
8
 
9
  class ModelProvider:
 
3
  """
4
  import os
5
  from typing import Dict, List, Tuple, Optional
6
+ from .agent_models import AgentConfig
7
 
8
 
9
  class ModelProvider:
shared/src/fitness_core/services/conversation.py CHANGED
@@ -2,7 +2,7 @@
2
  Conversation management for the fitness agent.
3
  """
4
  from typing import List, Dict, Union, Any
5
- from ..agents.models import ConversationMessage
6
  from .exceptions import ConversationError
7
 
8
 
 
2
  Conversation management for the fitness agent.
3
  """
4
  from typing import List, Dict, Union, Any
5
+ from ..agents.agent_models import ConversationMessage
6
  from .exceptions import ConversationError
7
 
8