Skip to content

Commit

Permalink
Fix another pytype issue
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 696315992
Change-Id: I4cb543da859c4cb3d72b8a39767b6656952fbe3e
  • Loading branch information
jzleibo authored and copybara-github committed Nov 14, 2024
1 parent 3a7cc99 commit bfde374
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion concordia/components/game_master/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

from concordia import components as generic_components
from concordia.agents import deprecated_agent
from concordia.agents import entity_agent
from concordia.associative_memory import associative_memory
from concordia.associative_memory import blank_memories
from concordia.clocks import game_clock
Expand All @@ -33,6 +34,7 @@
from concordia.utils import helper_functions
import termcolor


CONVERSATIONALIST_STYLES = (
'succinct',
'laconic',
Expand Down Expand Up @@ -89,7 +91,7 @@ class Conversation(component.Component):

def __init__(
self,
players: Sequence[deprecated_agent.BasicAgent],
players: Sequence[deprecated_agent.BasicAgent | entity_agent.EntityAgent],
model: language_model.LanguageModel,
memory: associative_memory.AssociativeMemory,
clock: game_clock.MultiIntervalClock,
Expand Down
3 changes: 2 additions & 1 deletion concordia/components/game_master/direct_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import datetime

from concordia.agents import deprecated_agent
from concordia.agents import entity_agent
from concordia.associative_memory import associative_memory
from concordia.document import interactive_document
from concordia.language_model import language_model
Expand All @@ -37,7 +38,7 @@ class DirectEffect(component.Component):

def __init__(
self,
players: Sequence[deprecated_agent.BasicAgent],
players: Sequence[deprecated_agent.BasicAgent | entity_agent.EntityAgent],
clock_now: Callable[[], datetime.datetime],
model: language_model.LanguageModel,
memory: associative_memory.AssociativeMemory,
Expand Down
3 changes: 2 additions & 1 deletion concordia/environment/scenes/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from collections.abc import Mapping, Sequence

from concordia.agents import deprecated_agent
from concordia.agents import entity_agent
from concordia.environment import game_master
from concordia.typing import clock as game_clock
from concordia.typing import logging as logging_lib
Expand Down Expand Up @@ -60,7 +61,7 @@ def _get_interscene_messages(
def run_scenes(
environment: game_master.GameMaster,
scenes: Sequence[scene_lib.SceneSpec],
players: Sequence[deprecated_agent.BasicAgent],
players: Sequence[deprecated_agent.BasicAgent | entity_agent.EntityAgent],
clock: game_clock.GameClock,
verbose: bool = False,
compute_metrics: Mapping[str, logging_lib.Metric] | None = None,
Expand Down
3 changes: 2 additions & 1 deletion concordia/thought_chains/thought_chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import random

from concordia.agents import deprecated_agent
from concordia.agents import entity_agent
from concordia.document import interactive_document
from concordia.language_model import language_model
from concordia.typing import agent as agent_types
Expand Down Expand Up @@ -322,7 +323,7 @@ class AccountForAgencyOfOthers:
def __init__(
self,
model: language_model.LanguageModel,
players: Sequence[deprecated_agent.BasicAgent],
players: Sequence[deprecated_agent.BasicAgent | entity_agent.EntityAgent],
verbose: bool = False,
):
self._model = model
Expand Down

0 comments on commit bfde374

Please sign in to comment.