fix TODO
This commit is contained in:
parent
c61a2ac772
commit
637c1b4c1d
@ -187,9 +187,7 @@ async def stream_code(websocket: WebSocket):
|
|||||||
await send_message("status", "Generating code...", 0)
|
await send_message("status", "Generating code...", 0)
|
||||||
await send_message("status", "Generating code...", 1)
|
await send_message("status", "Generating code...", 1)
|
||||||
|
|
||||||
# TODO(*): Move down
|
### Prompt creation
|
||||||
async def process_chunk(content: str, variantIndex: int):
|
|
||||||
await send_message("chunk", content, variantIndex)
|
|
||||||
|
|
||||||
# Image cache for updates so that we don't have to regenerate images
|
# Image cache for updates so that we don't have to regenerate images
|
||||||
image_cache: Dict[str, str] = {}
|
image_cache: Dict[str, str] = {}
|
||||||
@ -206,6 +204,11 @@ async def stream_code(websocket: WebSocket):
|
|||||||
|
|
||||||
pprint_prompt(prompt_messages) # type: ignore
|
pprint_prompt(prompt_messages) # type: ignore
|
||||||
|
|
||||||
|
### Code generation
|
||||||
|
|
||||||
|
async def process_chunk(content: str, variantIndex: int):
|
||||||
|
await send_message("chunk", content, variantIndex)
|
||||||
|
|
||||||
if SHOULD_MOCK_AI_RESPONSE:
|
if SHOULD_MOCK_AI_RESPONSE:
|
||||||
completions = [
|
completions = [
|
||||||
await mock_completion(process_chunk, input_mode=validated_input_mode)
|
await mock_completion(process_chunk, input_mode=validated_input_mode)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user