mirror of
https://github.com/anomalyco/opencode-sdk-python.git
synced 2026-04-28 12:39:54 +00:00
feat(api): api update
This commit is contained in:
parent
10a8dac1d7
commit
c75867efe7
6 changed files with 19 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
|||
configured_endpoints: 26
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-335697785b44f3928145853339226bd5e8accd5199bb9d79e2a3fd2d8ce62a57.yml
|
||||
openapi_spec_hash: 74fbaad0fa44496d0d8b11d9b98eab03
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-fb4caa8d0381531c44dd2d3c8c0b930b8c15a7bdde474d15bf7aeeb3b27aef56.yml
|
||||
openapi_spec_hash: 3a263e46f2369eeb2410430001c60d15
|
||||
config_hash: 1ae82c93499b9f0b9ba828b8919f9cb3
|
||||
|
|
|
|||
1
api.md
1
api.md
|
|
@ -23,6 +23,7 @@ Types:
|
|||
```python
|
||||
from opencode_ai.types import (
|
||||
App,
|
||||
LogLevel,
|
||||
Mode,
|
||||
Model,
|
||||
Provider,
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Dict
|
||||
from typing_extensions import Literal
|
||||
|
||||
import httpx
|
||||
|
||||
from ..types import app_log_params
|
||||
from ..types import LogLevel, app_log_params
|
||||
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from .._utils import maybe_transform, async_maybe_transform
|
||||
from .._compat import cached_property
|
||||
|
|
@ -20,6 +19,7 @@ from .._response import (
|
|||
)
|
||||
from ..types.app import App
|
||||
from .._base_client import make_request_options
|
||||
from ..types.log_level import LogLevel
|
||||
from ..types.app_log_response import AppLogResponse
|
||||
from ..types.app_init_response import AppInitResponse
|
||||
from ..types.app_modes_response import AppModesResponse
|
||||
|
|
@ -89,7 +89,7 @@ class AppResource(SyncAPIResource):
|
|||
def log(
|
||||
self,
|
||||
*,
|
||||
level: Literal["debug", "info", "error", "warn"],
|
||||
level: LogLevel,
|
||||
message: str,
|
||||
service: str,
|
||||
extra: Dict[str, object] | NotGiven = NOT_GIVEN,
|
||||
|
|
@ -237,7 +237,7 @@ class AsyncAppResource(AsyncAPIResource):
|
|||
async def log(
|
||||
self,
|
||||
*,
|
||||
level: Literal["debug", "info", "error", "warn"],
|
||||
level: LogLevel,
|
||||
message: str,
|
||||
service: str,
|
||||
extra: Dict[str, object] | NotGiven = NOT_GIVEN,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ from .message import Message as Message
|
|||
from .session import Session as Session
|
||||
from .provider import Provider as Provider
|
||||
from .file_part import FilePart as FilePart
|
||||
from .log_level import LogLevel as LogLevel
|
||||
from .text_part import TextPart as TextPart
|
||||
from .tool_part import ToolPart as ToolPart
|
||||
from .file_source import FileSource as FileSource
|
||||
|
|
|
|||
|
|
@ -3,13 +3,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Dict
|
||||
from typing_extensions import Literal, Required, TypedDict
|
||||
from typing_extensions import Required, TypedDict
|
||||
|
||||
from .log_level import LogLevel
|
||||
|
||||
__all__ = ["AppLogParams"]
|
||||
|
||||
|
||||
class AppLogParams(TypedDict, total=False):
|
||||
level: Required[Literal["debug", "info", "error", "warn"]]
|
||||
level: Required[LogLevel]
|
||||
"""Log level"""
|
||||
|
||||
message: Required[str]
|
||||
|
|
|
|||
7
src/opencode_ai/types/log_level.py
Normal file
7
src/opencode_ai/types/log_level.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
|
||||
__all__ = ["LogLevel"]
|
||||
|
||||
LogLevel: TypeAlias = Literal["debug", "info", "error", "warn"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue