from __future__ import annotations

import urllib.parse
from typing import Any, Dict, Optional

from ..client import Client

class AIConversationResource:
    def __init__(self, client: Client) -> None:
        self._client = client

    def articleConversationStart(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/ai/article/conversation/start", query=query, body=body)

    def articleConversationContinue(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/ai/article/conversation/continue", query=query, body=body)

    def articleConversationConversationId(self, conversationId, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("GET", "/ai/article/conversation/" + urllib.parse.quote(str(conversationId)), query=query, body=None)

    def conversationGenerateStream(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/ai/conversation/generate/stream", query=query, body=body)

    def conversationGenerate(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/ai/conversation/generate", query=query, body=body)

    def articleConversationRegenerate(self, body: Any, *, query: Optional[Dict[str, Any]] = None):
        return self._client.request("POST", "/ai/article/conversation/regenerate", query=query, body=body)
