Skip to content

Commit f00bc50

Browse files
authored
Merge pull request #882 from Mirascope/fix-cost-imports-docs
Fix cost imports and API docs
2 parents 1d2eea5 + 88159fe commit f00bc50

File tree

8 files changed

+24
-4
lines changed

8 files changed

+24
-4
lines changed

docs/api/core/base/types.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# mirascope.core.base.types
2+
3+
::: mirascope.core.base.types

docs/api/core/costs/calculate_cost.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# mirascope.core.costs.calculate_cost
2+
3+
::: mirascope.core.costs.calculate_cost

mirascope/core/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
BaseTool,
1515
BaseToolKit,
1616
CacheControlPart,
17+
CostMetadata,
1718
DocumentPart,
1819
FromCallArgs,
1920
ImagePart,
@@ -74,6 +75,7 @@
7475
"BaseTool",
7576
"BaseToolKit",
7677
"CacheControlPart",
78+
"CostMetadata",
7779
"DocumentPart",
7880
"FromCallArgs",
7981
"ImagePart",

mirascope/core/base/__init__.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@
3030
from .structured_stream import BaseStructuredStream
3131
from .tool import BaseTool, GenerateJsonSchemaNoTitles, ToolConfig
3232
from .toolkit import BaseToolKit, toolkit_tool
33-
from .types import AudioSegment, JsonableType, LocalProvider, Provider, Usage
33+
from .types import (
34+
AudioSegment,
35+
CostMetadata,
36+
JsonableType,
37+
LocalProvider,
38+
Provider,
39+
Usage,
40+
)
3441

3542
__all__ = [
3643
"AudioPart",
@@ -50,6 +57,7 @@
5057
"BaseType",
5158
"CacheControlPart",
5259
"CommonCallParams",
60+
"CostMetadata",
5361
"DocumentPart",
5462
"FromCallArgs",
5563
"GenerateJsonSchemaNoTitles",

mirascope/llm/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
from ..core import LocalProvider, Provider, calculate_cost
1+
from ..core import CostMetadata, LocalProvider, Provider, calculate_cost
22
from .call_response import CallResponse
33
from .llm_call import call
44
from .llm_override import override
55

66
__all__ = [
77
"CallResponse",
8+
"CostMetadata",
89
"LocalProvider",
910
"Provider",
1011
"calculate_cost",

mkdocs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ nav:
347347
- structured_stream: "api/core/base/structured_stream.md"
348348
- tool: "api/core/base/tool.md"
349349
- toolkit: "api/core/base/toolkit.md"
350+
- types: "api/core/base/types.md"
350351
- Bedrock:
351352
- call: "api/core/bedrock/call.md"
352353
- call_params: "api/core/bedrock/call_params.md"
@@ -363,6 +364,8 @@ nav:
363364
- dynamic_config: "api/core/cohere/dynamic_config.md"
364365
- stream: "api/core/cohere/stream.md"
365366
- tool: "api/core/cohere/tool.md"
367+
- Costs:
368+
- calculate_cost: "api/core/costs/calculate_cost.md"
366369
- Gemini:
367370
- call: "api/core/gemini/call.md"
368371
- call_params: "api/core/gemini/call_params.md"

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mirascope"
3-
version = "1.20.0"
3+
version = "1.20.1"
44
description = "LLM abstractions that aren't obstructions"
55
readme = "README.md"
66
license = { file = "LICENSE" }

uv.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)