Skip to content

Instantly share code, notes, and snippets.

View zning1994's full-sized avatar
🎯
Focusing DevOps, Machine Intelligence and Blog

ZHANG Ning zning1994

🎯
Focusing DevOps, Machine Intelligence and Blog
View GitHub Profile
@zning1994
zning1994 / openai-proxy.py
Created May 13, 2023 10:07 — forked from wujianguo/openai-proxy.py
openai chatgpt python flask proxy 代理,支持 SSE
from flask import Flask, request, Response
import requests, logging
_FIELD_SEPARATOR = ':'
class SSEClient(object):
"""Implementation of a SSE client.
See http://www.w3.org/TR/2009/WD-eventsource-20091029/ for the
specification.
"""
# create EKS cluster
module "base" {
source = "./base/"
cluster_name = var.cluster_name
name_prefix = var.name_prefix
main_network_block = var.main_network_block
subnet_prefix_extension = var.subnet_prefix_extension
zone_offset = var.zone_offset
eks_managed_node_groups = var.eks_managed_node_groups