MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / ChatCompletionRequest

Class ChatCompletionRequest

api/simple_chat.py:56–74  ·  view source on GitHub ↗

Model for requesting a chat completion.

Source from the content-addressed store, hash-verified

54 content: str
55
56class ChatCompletionRequest(BaseModel):
57 """
58 Model for requesting a chat completion.
59 """
60 repo_url: str = Field(..., description="URL of the repository to query")
61 messages: List[ChatMessage] = Field(..., description="List of chat messages")
62 filePath: Optional[str] = Field(None, description="Optional path to a file in the repository to include in the prompt")
63 token: Optional[str] = Field(None, description="Personal access token for private repositories")
64 type: Optional[str] = Field("github", description="Type of repository (e.g., 'github', 'gitlab', 'bitbucket')")
65
66 # model parameters
67 provider: str = Field("google", description="Model provider (google, openai, openrouter, ollama, bedrock, azure, dashscope)")
68 model: Optional[str] = Field(None, description="Model name for the specified provider")
69
70 language: Optional[str] = Field("en", description="Language for content generation (e.g., 'en', 'ja', 'zh', 'es', 'kr', 'vi')")
71 excluded_dirs: Optional[str] = Field(None, description="Comma-separated list of directories to exclude from processing")
72 excluded_files: Optional[str] = Field(None, description="Comma-separated list of file patterns to exclude from processing")
73 included_dirs: Optional[str] = Field(None, description="Comma-separated list of directories to include exclusively")
74 included_files: Optional[str] = Field(None, description="Comma-separated list of file patterns to include exclusively")
75
76@app.post("/chat/completions/stream")
77async def chat_completions_stream(request: ChatCompletionRequest):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected