> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.fast_depends.core.CallModel

<h2 id="autogen.fast_depends.core.CallModel" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">CallModel</span>
</h2>

```python theme={null}
CallModel(
    call: Callable[~P, ~T] | Callable[~P, Awaitable[~T]],
    model: Type[BaseModel] | None,
    params: Dict[str, Tuple[Any, Any]],
    response_model: Type[ResponseModel] | None = None,
    use_cache: bool = True,
    cast: bool = True,
    is_async: bool = False,
    is_generator: bool = False,
    dependencies: Dict[str, ForwardRef('CallModel[..., Any]')] | None = None,
    extra_dependencies: Iterable[ForwardRef('CallModel[..., Any]')] | None = None,
    keyword_args: List[str] | None = None,
    positional_args: List[str] | None = None,
    var_positional_arg: str | None = None,
    var_keyword_arg: str | None = None,
    custom_fields: Dict[str, CustomField] | None = None
)
```

Abstract base class for generic types.<br />On Python 3.12 and newer, generic classes implicitly inherit from
Generic when they declare a parameter list after the class's name:: <br />    class Mapping\[KT, VT]: <br />        def **getitem**(self, key: KT) -> VT: <br />            ...<br />        # Etc.<br />On older versions of Python, however, generic classes have to
explicitly inherit from Generic.<br />After a class has been declared to be generic, it can then be used as
follows:: <br />    def lookup\_name\[KT, VT]\(mapping: Mapping\[KT, VT], key: KT, default: VT) -> VT: <br />        try: <br />            return mapping\[key]
except KeyError: <br />            return default

<b>Parameters:</b>

| Name                 | Description                                                                                                                                              |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `call`               | **Type:** Callable\[\~P, \~T] \| Callable\[\~P, Awaitable\[\~T]]                                                                                         |
| `model`              | **Type:** Type\[pydantic.main.BaseModel] \| None                                                                                                         |
| `params`             | **Type:** Dict\[str, Tuple\[Any, Any]]                                                                                                                   |
| `response_model`     | **Type:** Type\[[ResponseModel](/docs/api-reference/autogen/fast_depends/core/model/ResponseModel)] \| None<br /><br />**Default:** None                 |
| `use_cache`          | **Type:** bool<br /><br />**Default:** True                                                                                                              |
| `cast`               | **Type:** bool<br /><br />**Default:** True                                                                                                              |
| `is_async`           | **Type:** bool<br /><br />**Default:** False                                                                                                             |
| `is_generator`       | **Type:** bool<br /><br />**Default:** False                                                                                                             |
| `dependencies`       | **Type:** Dict\[str, ForwardRef('[CallModel](/docs/api-reference/autogen/fast_depends/core/CallModel)\[..., Any]')] \| None<br /><br />**Default:** None |
| `extra_dependencies` | **Type:** Iterable\[ForwardRef('[CallModel](/docs/api-reference/autogen/fast_depends/core/CallModel)\[..., Any]')] \| None<br /><br />**Default:** None  |
| `keyword_args`       | **Type:** List\[str] \| None<br /><br />**Default:** None                                                                                                |
| `positional_args`    | **Type:** List\[str] \| None<br /><br />**Default:** None                                                                                                |
| `var_positional_arg` | **Type:** str \| None<br /><br />**Default:** None                                                                                                       |
| `var_keyword_arg`    | **Type:** str \| None<br /><br />**Default:** None                                                                                                       |
| `custom_fields`      | **Type:** Dict\[str, [CustomField](/docs/api-reference/autogen/fast_depends/library/model/CustomField)] \| None<br /><br />**Default:** None             |

### Instance Attributes

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### alias\_arguments

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### call

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### call\_name

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### cast

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### custom\_fields

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### dependencies

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### extra\_dependencies

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### flat\_dependencies

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### flat\_params

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### is\_async

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### is\_generator

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### keyword\_args

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### model

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### params

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### positional\_args

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### response\_model

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### sorted\_dependencies

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### use\_cache

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### var\_keyword\_arg

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### var\_positional\_arg

<br />

<br />

### Instance Methods

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### asolve

```python theme={null}
asolve(
    self,
    /,
    *args: Any,
    stack: AsyncExitStack,
    cache_dependencies: Dict[Callable[~P, ~T] | Callable[~P, Awaitable[~T]], ~T],
    dependency_overrides: Dict[Callable[~P, ~T] | Callable[~P, Awaitable[~T]], Callable[~P, ~T] | Callable[~P, Awaitable[~T]]] | None = None,
    nested: bool = False,
    **kwargs: Any
) -> ~T
```

<b>Parameters:</b>

| Name                   | Description                                                                                                                                                          |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/`                    |                                                                                                                                                                      |
| `*args`                | **Type:** Any                                                                                                                                                        |
| `stack`                | **Type:** contextlib.AsyncExitStack                                                                                                                                  |
| `cache_dependencies`   | **Type:** Dict\[Callable\[\~P, \~T] \| Callable\[\~P, Awaitable\[\~T]], \~T]                                                                                         |
| `dependency_overrides` | **Type:** Dict\[Callable\[\~P, \~T] \| Callable\[\~P, Awaitable\[\~T]], Callable\[\~P, \~T] \| Callable\[\~P, Awaitable\[\~T]]] \| None<br /><br />**Default:** None |
| `nested`               | **Type:** bool<br /><br />**Default:** False                                                                                                                         |
| `**kwargs`             | **Type:** Any                                                                                                                                                        |

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### solve

```python theme={null}
solve(
    self,
    /,
    *args: Any,
    stack: ExitStack,
    cache_dependencies: Dict[Callable[~P, ~T] | Callable[~P, Awaitable[~T]], ~T],
    dependency_overrides: Dict[Callable[~P, ~T] | Callable[~P, Awaitable[~T]], Callable[~P, ~T] | Callable[~P, Awaitable[~T]]] | None = None,
    nested: bool = False,
    **kwargs: Any
) -> ~T
```

<b>Parameters:</b>

| Name                   | Description                                                                                                                                                          |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/`                    |                                                                                                                                                                      |
| `*args`                | **Type:** Any                                                                                                                                                        |
| `stack`                | **Type:** contextlib.ExitStack                                                                                                                                       |
| `cache_dependencies`   | **Type:** Dict\[Callable\[\~P, \~T] \| Callable\[\~P, Awaitable\[\~T]], \~T]                                                                                         |
| `dependency_overrides` | **Type:** Dict\[Callable\[\~P, \~T] \| Callable\[\~P, Awaitable\[\~T]], Callable\[\~P, \~T] \| Callable\[\~P, Awaitable\[\~T]]] \| None<br /><br />**Default:** None |
| `nested`               | **Type:** bool<br /><br />**Default:** False                                                                                                                         |
| `**kwargs`             | **Type:** Any                                                                                                                                                        |

<br />
