MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / create

Method create

src/opencode_ai/resources/session.py:53–70  ·  view source on GitHub ↗

Create a new session

(
        self,
        *,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    )

Source from the content-addressed store, hash-verified

51 return SessionResourceWithStreamingResponse(self)
52
53 def create(
54 self,
55 *,
56 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57 # The extra values given here take precedence over values defined on the client or passed to this method.
58 extra_headers: Headers | None = None,
59 extra_query: Query | None = None,
60 extra_body: Body | None = None,
61 timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
62 ) -> Session:
63 """Create a new session"""
64 return self._post(
65 "/session",
66 options=make_request_options(
67 extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
68 ),
69 cast_to=Session,
70 )
71
72 def list(
73 self,

Calls 1

make_request_optionsFunction · 0.85