
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
This client is experimental and subject to change.
Used for connecting to a Generative AI platform called H2OGPTe. See more at h2o.ai.
npm install h2ogpte
This client can authenticate in 2 ways.
h2ogpte.setup('<endpoint_url>', '<token>')
). See <h2ogpteinstance/api>.h2ogpte.setup('<endpoint_url>', '', '', '<azure_token>')
)import * as h2ogpte from 'h2ogpte'
async function main() {
// Setup endpoint URL and access token.
h2ogpte.setup(
'<endpoint_url>',
'<token>',
'<optional CSRF token>',
'<optional Active Directory token>'
)
// Create new collection with English as embedding model.
const collectionID = await h2ogpte.createCollection(
'Name',
'Description',
'English (bge-large-en-v1.5)'
)
// Create dummy File. In real world, it would come from filepicker (browser).
const blob = new Blob(['This is some text content'], { type: 'text/plain' })
// Upload the file
const uploadID = await h2ogpte.uploadFile(
new File([blob], 'myTextFile.txt', { type: 'text/plain' })
)
// Ingest the file.
await h2ogpte.ingestUploads(
'Ingesting documents',
collectionID,
[uploadID],
false, // Generate document summaries.
false // Generate document questions.
)
// Create a chat session.
const { chatID } = await h2ogpte.createChatSession(collectionID)
const onMessage = message => console.log(message)
// Prepare a websocket client to start chatting. Pass onMessage callback.
const socket = h2ogpte.Socket(onMessage)
// Connect to server.
const close = socket.connect()
// Send a message.
socket.send({
t: 'cq',
mode: 's',
session_id: chatID,
correlation_id: correlationID,
body: 'Hello world',
system_prompt: null,
pre_prompt_query: null,
prompt_query: null,
pre_prompt_summary: null,
prompt_summary: null,
llm: null,
llm_args: null,
self_reflection_config: null,
rag_config: null,
})
// Close the connection.
close()
// Fetch first 100 documents in a collection.
const docs = await h2ogpte.listDocumentsInCollection(collectionID, 0, 99)
// Summarize all documents in collection.
const summaries = await Promise.all(
docs.map(({ id }) => {
return h2ogpte.createDocumentSummary(
'Document summary',
null,
id,
null,
null,
null,
null,
null,
null,
null,
null
)
})
)
}
main()
The client utilizes a generated REST API client for establishing communication with the H2OGPTe server. This generated layer is also accessible and documented here.
FAQs
Javascript client for H2OGPTe.
We found that h2ogpte demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.