New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

llm-report-node

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

llm-report-node

Log OpenAI requests to llm.report

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
13
Maintainers
1
Weekly downloads
 
Created
Source

Endpoint: POST /api/v1/log/openai

Request Headers:

  • X-Api-Key (required): The API key for authentication.

Request Body:

  • provider_id (string, required): The ID of the OpenAI request.
  • user_id (string, optional): The ID of the user making the request.
  • url (string, required): The URL of the OpenAI API endpoint.
  • method (string, required): The HTTP method used for the request.
  • status (integer, required): The HTTP status code of the response.
  • streamed (boolean, required): Whether OpenAI request is streamed or not.
  • model (string, required): The name or version of the OpenAI model used.
  • prompt_tokens (integer, required): The number of tokens used in the prompt.
  • completion_tokens (integer, required): The number of tokens in the completion.
  • hashed_key (string, required): Hashed OpenAI API key
  • completion (string, required): The completion text generated by OpenAI.
  • request_headers (string, required): The headers of the request.
  • request_body (string, required): The body of the request.
  • response_headers (string, required): The headers of the response.
  • response_body (string, required): The body of the response.

Response:

  • 200 OK: The log entry has been successfully created.
  • 400 Bad Request: The request is missing required parameters or contains invalid data.
  • 401 Unauthorized: The provided API key is invalid or missing.
  • 405 Method Not Allowed: The requested HTTP method is not supported for this endpoint.
  • 500 Internal Server Error: An error occurred while processing the request.

Description:

This endpoint is used to log OpenAI API interactions for monitoring and analysis purposes. The request should include the required headers and a JSON body containing the relevant information for the log entry. The response will indicate the success or failure of the log creation.

FAQs

Package last updated on 07 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc