0.0.6 • Published 9 months ago
@inferable/chat v0.0.6
Inferable Chat
A React-based chat interface for Inferable, available both as a CLI tool and a React component.
CLI Usage
Installation
npm install -g @inferable/chatThis will make the inf-chat command available globally.
Basic Usage
inf-chat \
--api-secret your_api_secret \
--cluster-id your_cluster_id \
[--agent-id your_agent_id] \
[--run-id existing_run_id]Environment Variables
All flags can also be set via environment variables:
INFERABLE_API_SECRETINFERABLE_CLUSTER_IDINFERABLE_AGENT_ID
Flags take precedence over environment variables.
Using with npx
npx @inferable/chat --api-secret your_api_secret --cluster-id your_cluster_idLibrary Usage
Installation
npm install @inferable/chatUsage as a React Component
import { ChatInterface } from '@inferable/chat';
function MyApp() {
return (
<ChatInterface
apiSecret="your-api-secret"
clusterId="your-cluster-id"
runId="optional-run-id"
agentId="optional-agent-id"
/>
);
}Local Development
npm run dev