Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyServer ¶
type ProxyServer struct { Client *http.Client RequestCount int64 TokensCount int64 TotalCost float64 Cache *cache.Cache Logger *logger.Logger Mutex sync.RWMutex }
func NewProxyServer ¶
func NewProxyServer(cacheDir, logDir string) (*ProxyServer, error)
func (*ProxyServer) OpenAIProxy ¶
func (s *ProxyServer) OpenAIProxy(w http.ResponseWriter, r *http.Request)
func (*ProxyServer) ResetCounters ¶
func (s *ProxyServer) ResetCounters()
Click to show internal directories.
Click to hide internal directories.