mirror of
https://github.com/fauxpilot/fauxpilot.git
synced 2025-08-14 02:28:06 -07:00
add fake copilot authentication to copilot proxy
This commit is contained in:
parent
fe69980660
commit
0be814be58
1 changed files with 8 additions and 0 deletions
|
@ -34,6 +34,14 @@ async def fauxpilot_handler(request: Request, exc: FauxPilotException):
|
|||
content=exc.json()
|
||||
)
|
||||
|
||||
@app.get("/copilot_internal/v2/token")
|
||||
def get_copilot_token():
|
||||
content = {'token': '1', 'expires_at': 2600000000, 'refresh_in': 900}
|
||||
return JSONResponse(
|
||||
status_code=200,
|
||||
content=content
|
||||
)
|
||||
|
||||
@app.post("/v1/engines/codegen/completions")
|
||||
@app.post("/v1/engines/copilot-codex/completions")
|
||||
@app.post("/v1/completions")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue