@audashai/cli 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audashai/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI tool to add AudashAI components to your React project",
5
5
  "bin": {
6
6
  "audashai": "./bin/audashai.js"
@@ -3,20 +3,20 @@ import { AudashAIInput } from './AudashAIInput';
3
3
  import { AudashAIOutput } from './AudashAIOutput';
4
4
 
5
5
  interface AudashAIChatbotProps {
6
- apiKey: string;
7
- apiUrl: string;
6
+ audashaiKey: string;
7
+ audashaiUrl: string;
8
8
  dataApiUrl?: string;
9
9
  endpoints?: string[];
10
10
  }
11
11
 
12
12
  const AudashAIChatbot: React.FC<AudashAIChatbotProps> = ({
13
- apiKey,
14
- apiUrl,
13
+ audashaiKey,
14
+ audashaiUrl,
15
15
  dataApiUrl,
16
16
  endpoints,
17
17
  }) => {
18
18
  return (
19
- <AudashAIProvider config={{ apiKey, apiUrl, dataApiUrl, endpoints }}>
19
+ <AudashAIProvider config={{ audashaiKey, audashaiUrl, dataApiUrl, endpoints }}>
20
20
  <div className="w-full max-w-7xl mx-auto p-4">
21
21
  <div className="flex flex-col lg:flex-row-reverse gap-4 lg:h-[300px] items-stretch">
22
22
  <div className="w-full lg:w-[350px] flex-shrink-0">
@@ -29,14 +29,14 @@ export const AudashAIInput: React.FC = () => {
29
29
  setErrorInfo(null);
30
30
 
31
31
  try {
32
- const response = await fetch(`${config.apiUrl}/query`, {
32
+ const response = await fetch(`${config.audashaiUrl}/query`, {
33
33
  method: 'POST',
34
34
  headers: {
35
35
  'Content-Type': 'application/json',
36
36
  },
37
37
  body: JSON.stringify({
38
38
  query: inputValue,
39
- api_key: config.apiKey,
39
+ api_key: config.audashaiKey,
40
40
  limit: 10,
41
41
  }),
42
42
  });
@@ -1,4 +1,3 @@
1
- // src/index.tsx
2
1
  export { default as AudashAIChatbot } from './components/AudashAIChatBot';
3
2
  export { AudashAIInput } from './components/AudashAIInput';
4
3
  export { AudashAIOutput } from './components/AudashAIOutput';
@@ -32,8 +32,8 @@ export interface QueryResponse {
32
32
  }
33
33
 
34
34
  export interface AudashAIConfig {
35
- apiKey: string;
36
- apiUrl: string;
35
+ audashaiKey: string;
36
+ audashaiUrl: string;
37
37
  dataApiUrl?: string;
38
38
  endpoints?: string[];
39
39
  }
@@ -33,7 +33,7 @@ export async function ingestSingleEndpoint(endpoint: string, config: AudashAICon
33
33
  throw new Error(`Failed to fetch data from ${endpoint}`);
34
34
  }
35
35
 
36
- const response = await fetch(`${config.apiUrl}/ingest`, {
36
+ const response = await fetch(`${config.audashaiUrl}/ingest`, {
37
37
  method: 'POST',
38
38
  headers: {
39
39
  'Content-Type': 'application/json',
@@ -41,7 +41,7 @@ export async function ingestSingleEndpoint(endpoint: string, config: AudashAICon
41
41
  body: JSON.stringify({
42
42
  data: data.data || data,
43
43
  source_name: endpoint,
44
- api_key: config.apiKey,
44
+ api_key: config.audashaiKey,
45
45
  metadata: { description: `${endpoint} data from API` },
46
46
  }),
47
47
  });