text
stringlengths
55
456k
metadata
dict
--- title: Images Slider description: A full page slider with images that can be navigated with the keyboard. --- ::ComponentLoader{label="Preview" componentName="ImagesSliderDemo" type="examples" id="images-slider"} :: ## API | Prop Name | Type | Default | Description | | ------------------ | -------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------ | | `images` | `string[]` | `[]` | An array of image URLs to show in the slider. | | `hideOverlay` | `boolean` | `false` | Don't create an overlay for the image slider. Slot won't be rendered. | | `overlayClass` | `string` | `''` | A class string to be applied to the overlay container. | | `imageClass` | `string` | `'bg-cover bg-center bg-no-repeat'` | Class string to apply to each of the images. | | `enterFromClass` | `string` | `'scale-0 origin-center'` | Class string applied to the 'enter-from-class' prop on the image transition. | | `enterActiveClass` | `string` | `'transition-transform duration-300 ease-in-out'` | Class string applied to the 'enter-active-class' prop on the image transition. | | `leaveActiveClass` | `string` | `'transition-transform duration-300 ease-in-out'` | Class string applied to the 'leave-active-class' prop on the image transition. | | `autoplay` | `boolean\|number` | `false` | Autoplay interval in ms, or `false` to disable. | | `direction` | `'vertical'\|'horizontal'` | `'vertical'` | The axis on which the slider should operate. | | `perspective` | `string` | `'1000px'` | The perspective to apply to the slider container. | | `modelValue` | `number` | `0` | Two-way binding for the current slide image index. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{label="ImagesSlider.vue" language="vue" componentName="ImagesSlider" type="ui" id="images-slider"} :: ## Features - **Horizontal & Vertical Animations**: You can animate the images horizontally (default) or vertically with the `direction` prop. - **Preloaded Images**: Images are preloaded before showing, preventing flickering loading animation. - **Customisable Autoplay**: Automatically transition through your slides, or allow your users to navigate manually. - **Overlay Anything**: The default slot allows you to overlay whatever content you wish overlay slider. ## Credits - Component by [Craig Riley](https://github.com/craigrileyuk) for porting this component. - Credits to [Aceternity UI](https://ui.aceternity.com/components/images-slider) for inspiring this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/images-slider.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/images-slider.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 3523 }
--- title: Lens description: A lens component to zoom into images, videos, or practically anything. --- ::ComponentLoader{label="Preview" componentName="LensDemo" type="examples" id="lens"} :: ## Examples ### Basic ::ComponentLoader{label="Preview" componentName="LensDemo" type="examples" id="lens"} :: ### Static Lens are static in center ::ComponentLoader{label="Preview" componentName="StaticLensDemo" type="examples" id="lens"} :: ## API | Prop Name | Type | Default | Description | | ------------ | -------------------------- | -------------------- | ---------------------------------------------------------------------------- | | `zoomFactor` | `number` | `1.5` | The magnification factor for the lens. | | `lensSize` | `number` | `170` | The diameter of the lens in pixels. | | `position` | `{ x: number, y: number }` | `{ x: 200, y: 150 }` | The static position of the lens (when isStatic is true). | | `isStatic` | `boolean` | `false` | If true, the lens stays in a fixed position; if false, it follows the mouse. | | `hovering` | `boolean` | `"false"` | External control for the hover state. | ## Component Code You can copy and paste the following code to create these components: ::code-group ::CodeViewerTab{label="Lens.vue" icon="vscode-icons:file-type-vue" componentName="Lens" type="ui" id="lens"} :: ::CodeViewerTab{label="Rays.vue" icon="vscode-icons:file-type-vue" componentName="Rays" type="examples" id="lens"} :: ::CodeViewerTab{label="Beams.vue" icon="vscode-icons:file-type-vue" componentName="Beams" type="examples" id="lens"} :: ## Features - **Slot Support**: Easily add any content inside the component using the default slot. ## Credits - Credits to [Aceternity UI](https://ui.aceternity.com/components/lens). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/lens.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/lens.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2229 }
--- title: Link Preview description: Dynamic link previews for your anchor tags --- ::ComponentLoader{label="Preview" componentName="LinkPreviewDemo" type="examples"} :: ::alert{type="info"} **Note:** This component requires `qss` npm package as a dependency. Please install qss using following commands. ::code-group ```bash [npm] npm install qss ``` ```bash [pnpm] pnpm install qss ``` ```bash [bun] bun add qss ``` ```bash [yarn] yarn add qss ``` :: :: ## API | Prop Name | Type | Default | Description | | ----------- | --------- | ------- | ------------------------------------------------------------------------------------------- | | `class` | `string` | `""` | Custom class applied to the main element. | | `linkClass` | `string` | `""` | Custom class applied to the link element. | | `width` | `number` | `200` | Width of the preview image. | | `height` | `number` | `125` | Height of the preview image. | | `isStatic` | `boolean` | `false` | Determines if the preview image is static or a URL preview (set to `true` for static mode). | | `imageSrc` | `string` | `""` | The source of the image to display (required if `isStatic` is `true`). | | `url` | `string` | `""` | URL for the link and for generating the preview image (required if `isStatic` is `false`). | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="LinkPreview.vue" language="vue" componentName="LinkPreview" type="ui" id="link-preview"} :: ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Link Preview](https://ui.aceternity.com/components/link-preview).
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/link-preview.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/link-preview.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2115 }
--- title: Marquee description: A customizable scrolling component that loops its content horizontally or vertically, with configurable direction, hover pause, and repeat options. --- ::ComponentLoader{label="Preview" componentName="MarqueeDemo" type="examples" id="marquee"} :: ## API | Prop Name | Type | Default | Description | | -------------- | --------- | ------- | ------------------------------------------------------------------------- | | `class` | `string` | `''` | Custom CSS classes to apply to the outermost container of the marquee. | | `reverse` | `boolean` | `false` | Sets the scrolling direction to reverse (right to left or bottom to top). | | `pauseOnHover` | `boolean` | `false` | Pauses the marquee animation when hovered. | | `vertical` | `boolean` | `false` | Sets the scrolling direction to vertical instead of horizontal. | | `repeat` | `number` | `4` | Number of times the content inside the marquee should be repeated. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="Marquee.vue" language="vue" componentName="Marquee" type="ui" id="marquee"} :: ::CodeViewerTab{label="ReviewCard.vue" language="vue" componentName="ReviewCard" type="examples" id="marquee"} :: :: ## Features - **Horizontal & Vertical Scrolling**: You can scroll the content horizontally (default) or vertically with the `vertical` prop. - **Reverse Direction**: Enable reverse scrolling for dynamic effects using the `reverse` prop. - **Pause on Hover**: Pauses the scrolling animation when the user hovers over the marquee. - **Content Repetition**: The `repeat` prop controls how many times the content inside the marquee will loop. - **Custom Duration and Gap**: You can control the animation duration and gap between the repeated items using CSS variables `--duration` and `--gap`. ## CSS Variables You can customize the speed and gap between the items by setting the following CSS variables: - **`--duration`**: Controls the speed of the marquee animation. - **`--gap`**: Sets the space between repeated items in the marquee. ## Features - **Fully Customizable**: Easily adjust the duration, gap, direction, and hover behavior to suit your needs. - **Smooth Transitions**: The component uses CSS keyframes to achieve smooth scrolling and transitions. - **Multi-Directional**: Scroll content either horizontally or vertically with a simple prop change. - **Content Flexibility**: Place any Vue components or HTML elements inside the marquee slot for dynamic content scrolling. ## Credits - Inspired by [Magic UI](https://magicui.design/docs/components/marquee).
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/marquee.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/marquee.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2811 }
--- title: Morphing Tabs description: This is a morphing tabs interaction, recreated by Preet's work and featuring the gooey effect component. --- ::ComponentLoader{label="Preview" componentName="MorphingTabsDemo" type="examples" id="morphing-tabs"} :: ## API | Prop Name | Type | Default | Description | | ------------------ | ---------- | ------- | ---------------------------------------------- | | `class` | `string` | `""` | Additional class names to style the component. | | `tabs` | `string[]` | `[]` | Tabs. | | `activeTab` | `string` | `""` | Current active Tab. | | `margin` | `number` | `20` | Active tab margin left and right. | | `blurStdDeviation` | `number` | `6` | Svg blur stdDeviation, tab rounded use it. | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="MorphingTabs.vue" language="vue" componentName="MorphingTabs" type="ui" id="morphing-tabs"} :: ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [@Preet "Exclusion tabs"](https://x.com/wickedmishra/status/1823026659894940124).
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/morphing-tabs.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/morphing-tabs.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1335 }
--- title: Multi Step Loader description: A step loader for screens that works with async conditions too. --- ::ComponentLoader{label="Preview" componentName="MultiStepLoaderDemo" type="examples"} :: ## API | Prop Name | Type | Default | Description | | ----------------- | --------- | ------- | ---------------------------------------------------------------------------- | | `loading` | `boolean` | `false` | Controls the visibility of the loader. When `true`, the loader is displayed. | | `steps` | `Step[]` | `[]` | Array of step objects defining the loading sequence. | | `defaultDuration` | `number` | `1500` | The duration of each step in milliseconds. | | `preventClose` | `boolean` | `false` | If `true`, the close button will not be shown. | | Event Name | Payload Type | Description | | -------------- | ------------ | -------------------------------------------------------------------- | | `state-change` | `number` | Emitted when the current step changes, providing the new step index. | | `complete` | `void` | Emitted when all steps have been completed. | | `close` | `void` | Emitted when the loader is closed by button. | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="MultiStepLoader.vue" language="vue" componentName="MultiStepLoader" type="ui" id="multi-step-loader"} :: ## Credits - Credits to [M Atif](https://github.com/atif0075) for this component. - Inspired from [Aceternity UI's Multi Step Loader](https://ui.aceternity.com/components/multi-step-loader).
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/multi-step-loader.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/multi-step-loader.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1888 }
--- title: Photo Gallery description: Showcase your team with pride using our stunning Photo Gallery Component. --- ::ComponentLoader{label="Preview" componentName="PhotoGalleryDemo" type="examples" id="photo-gallery"} :: ## API | Prop Name | Type | Default | Description | | ---------------- | ------------------- | ------- | ------------------------------------------------------ | | `items` | `"[{src: string}]"` | `[]` | Pass items / image src to animate | | `containerClass` | `string` | `""` | Additional tailwind CSS classes for container styling. | | `class` | `string` | `""` | Additional tailwind CSS classes for custom styling. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="PhotoGallery.vue" language="vue" componentName="PhotoGallery" type="ui" id="photo-gallery"} :: ## Credits - All images from [Pexels](https://www.pexels.com/@soldiervip/) - Thanks to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for providing this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/photo-gallery.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/photo-gallery.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1164 }
--- title: Scroll Island description: A dynamic and interactive component that displays scroll progress with animated visuals and an expandable area for additional content. --- ::ComponentLoader{label="Preview" componentName="ScrollIslandDemo" type="examples" id="scroll-island"} :: ::alert{type="info"} **Note:** This component uses NumberFlow & requires `@number-flow/vue` npm package as a dependency. Please install NumberFlow using following commands. ::code-group ```bash [npm] npm install @number-flow/vue ``` ```bash [pnpm] pnpm install @number-flow/vue ``` ```bash [bun] bun add @number-flow/vue ``` ```bash [yarn] yarn add @number-flow/vue ``` :: :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------------ | ----------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `title` | `string` | `"Progress"` | Title displayed in the header of the component. | | `height` | `string` | `44` | Height of the component. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="ScrollIsland.vue" language="vue" componentName="ScrollIsland" type="ui" id="scroll-island"} :: :: ## Features - **Scroll Progress Tracking**: Dynamically displays the scroll progress of the page as a percentage. - **Expandable Layout**: Transforms between a circular and a rectangular layout based on user interaction. - **Animated Circular Progress Bar**: Displays a visually appealing progress bar with smooth transitions. - **Dynamic Content Slot**: Supports additional content in the expandable section. - **Dark Mode Support**: Adapts to the dark or light mode of the user's system preferences. ## Credits - Inspired by the work of [Ali Samadi](https://x.com/alisamadi__/status/1854312982559502556) & [Nitish Khagwal](https://x.com/nitishkmrk) - [NumberFlow by Maxwell Barvian](https://number-flow.barvian.me/vue) for number formatting and animations.
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/scroll-island.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/scroll-island.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2178 }
--- title: SVG Mask description: A dynamic SVG mask component that reveals content with hover and mouse movement. --- ::ComponentLoader{label="Preview" componentName="SvgMaskDemo" type="examples" id="svg-mask"} :: ## API | Prop Name | Type | Default | Description | | ------------ | -------- | ------- | ------------------------------------------ | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `size` | `number` | `10` | Initial size of the mask in pixels. | | `revealSize` | `number` | `600` | Size of the mask during hover in pixels. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="SVGMask.vue" language="vue" componentName="SVGMask" type="ui" id="svg-mask"} :: ```html [mask.svg] <svg width="1298" height="1298" viewBox="0 0 1298 1298" fill="none" xmlns="http://www.w3.org/2000/svg" > <circle cx="649" cy="649" r="649" fill="black" /> </svg> ``` :: ## Features - **Hover-Activated Mask**: The SVG mask dynamically enlarges when hovered, revealing the content beneath. - **Mouse Tracking**: The mask follows the cursor, creating an engaging and interactive effect. - **Customizable Mask Size**: Adjust the initial size (`size`) and hover size (`revealSize`) for different effects. - **Slot-Based Content**: Supports named slots for base and reveal content, making it flexible for various use cases. - **Responsive Background**: Includes hover-based background color transitions for added visual appeal. ## Credits - Ported from [Aceternity UI's SVG Mask Effect](https://ui.aceternity.com/components/text-generate-effect).
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/svg-mask.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/svg-mask.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1740 }
--- title: Timeline description: A visually appealing and interactive timeline component with smooth animations, sticky labels, and a gradient scrolling effect. navBadges: - value: New type: lime --- ::ComponentLoader{label="Preview" componentName="TimelineDemo" type="examples" id="timeline"} :: ## API | Prop Name | Type | Default | Description | | ---------------- | ---------------------------------- | ------- | -------------------------------------------------- | | `containerClass` | `string` | `""` | Additional CSS classes for the timeline container. | | `class` | `string` | `""` | Additional CSS classes for styling. | | `items` | `{ id: string; label: string; }[]` | `[]` | List of timeline items, each with an ID and label. | | `title` | `string` | `""` | Title of the timeline section. | | `description` | `string` | `""` | Description text displayed below the title. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="Timeline.vue" language="vue" componentName="Timeline" type="ui" id="timeline"} :: :: ## Features - **Animated Scroll Effect**: The timeline bar animates smoothly as the user scrolls. - **Sticky Labels**: Each event label remains visible while scrolling. - **Gradient Progress Bar**: A visually appealing timeline indicator with gradient effects. - **Slot Support**: Custom content can be placed within each timeline item. - **Responsive Design**: Adapts seamlessly to different screen sizes. - **Dark Mode Support**: Automatically adjusts to light or dark themes. ## Credits - Inspired and ported from [Aceternity UI's Timeline](https://ui.aceternity.com/components/timeline).
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/timeline.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/timeline.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1975 }
--- title: Tracing Beam description: A component that renders a tracing beam effect with dynamic scrolling animations and gradient strokes. --- ::ComponentLoader{label="Preview" componentName="TracingBeamDemo" type="examples"} :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | ------------------------------------------ | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="TracingBeam.vue" language="vue" componentName="TracingBeam" type="ui" id="tracing-beam"} :: ## Features - **Dynamic Tracing Beam**: Renders a gradient tracing beam that follows the scroll position, adding a modern visual effect. - **Scroll-Based Animation**: As the user scrolls, the beam animates along a path with varying gradients, responding to scroll depth. - **Gradient Transition**: Smoothly transitions colors along the beam from cyan to purple with fading edges for a subtle effect. - **Slot-Based Content**: Supports a default slot to add content inside the tracing beam container. ## Credits - Ported from [Aceternity UI](https://ui.aceternity.com/components/tracing-beam);
{ "source": "unovue/inspira-ui", "title": "content/2.components/miscellaneous/tracing-beam.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/miscellaneous/tracing-beam.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1280 }
--- title: Animated Beam description: An SVG beam connecting elements with animation. --- ::ComponentLoader{label="Preview" componentName="AnimatedBeamDemo" type="examples"} :: ::alert{type="warning"} This component uses the `nuxt-only` syntax with the `<ClientOnly>`. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | -------------------- | ------------- | ---------------------- | ---------------------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes to apply to the component for customization. | | `containerRef` | `HTMLElement` | N/A | Reference to the container element where the beam is rendered. | | `fromRef` | `HTMLElement` | N/A | Reference to the starting element from which the beam originates. | | `toRef` | `HTMLElement` | N/A | Reference to the ending element where the beam points to. | | `curvature` | `number` | `0` | Controls the curvature of the beam; higher values create a more curved path. | | `reverse` | `boolean` | `false` | Reverses the animation direction of the beam if set to `true`. | | `pathColor` | `string` | `"gray"` | Color of the beam's path. | | `pathWidth` | `number` | `2` | Stroke width of the beam's path. | | `pathOpacity` | `number` | `0.2` | Opacity of the beam's path. | | `gradientStartColor` | `string` | `"#FFAA40"` | Starting color of the beam's gradient animation. | | `gradientStopColor` | `string` | `"#9C40FF"` | Ending color of the beam's gradient animation. | | `delay` | `number` | `0` | Delay before the beam's animation starts, in seconds. | | `duration` | `number` | `Random between 4–7 s` | Duration of the beam's animation cycle, in seconds. | | `startXOffset` | `number` | `0` | Horizontal offset for the beam's starting point. | | `startYOffset` | `number` | `0` | Vertical offset for the beam's starting point. | | `endXOffset` | `number` | `0` | Horizontal offset for the beam's ending point. | | `endYOffset` | `number` | `0` | Vertical offset for the beam's ending point. | ## Example Double-sided beam. ::ComponentLoader{label="Preview" componentName="AnimatedBeamDemo2" type="examples"} :: ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="AnimatedBeam.vue" language="vue" componentName="AnimatedBeam" type="ui" id="animated-beam"} :: ## Features - **Dynamic Beam Drawing**: Automatically renders a beam between two specified elements on the page. - **Smooth Animation**: Features a gradient animation that flows along the beam's path for a visually engaging effect. - **Customizable Appearance**: Easily adjust color, width, opacity, and curvature to match your design requirements. - **Responsive Updates**: The beam adjusts its position and size in response to window resizing and element repositioning. - **Flexible Animation Control**: Customize the animation's duration, delay, and direction for precise timing. ## Credits - Inspired and ported from [Magic UI Animated Beam](https://magicui.design/docs/components/animated-beam).
{ "source": "unovue/inspira-ui", "title": "content/2.components/special-effects/animated-beam.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/special-effects/animated-beam.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 4123 }
--- title: Border Beam description: A stylish animated border beam effect with customizable size, duration, colors, and delay. --- ::ComponentLoader{label="Preview" componentName="BorderBeamDemo" type="examples"} :: ::alert{type="warning"} This component uses the `nuxt-only` syntax with the `<ClientOnly>`. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | ------------- | -------- | ----------- | --------------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `size` | `number` | `200` | Size of the animated border beam effect. | | `duration` | `number` | `15` | Duration of the animation in seconds. | | `borderWidth` | `number` | `1.5` | Width of the border around the beam effect. | | `anchor` | `number` | `90` | Anchor point for the beam, determining its position along the border. | | `colorFrom` | `string` | `"#ffaa40"` | Starting color for the gradient of the beam. | | `colorTo` | `string` | `"#9c40ff"` | Ending color for the gradient of the beam. | | `delay` | `number` | `0` | Delay before the animation starts, in seconds. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="BorderBeam.vue" language="vue" componentName="BorderBeam" type="ui" id="border-beam"} :: ## Features - **Animated Border Beam**: Adds a dynamic border beam effect that animates around the border. - **Customizable Gradient Colors**: Adjust the `colorFrom` and `colorTo` props to create a gradient effect that suits your design. - **Flexible Animation Settings**: Control the size, duration, and delay of the animation to fine-tune the visual experience. - **Anchor Positioning**: Use the `anchor` prop to set the starting position of the beam along the border. ## Credits - Ported from [Magic UI](https://magicui.design/docs/components/border-beam).
{ "source": "unovue/inspira-ui", "title": "content/2.components/special-effects/border-beam.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/special-effects/border-beam.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2289 }
--- title: Confetti description: A Vue component for confetti animations. --- ::ComponentLoader{label="Preview" componentName="ConfettiDemo" type="examples" id="confetti"} :: ## Examples ### Basic ::ComponentLoader{label="Preview" componentName="ConfettiBasicDemo" type="examples" id="confetti"} :: ### Random Direction ::ComponentLoader{label="Preview" componentName="ConfettiRandomDirectionDemo" type="examples" id="confetti"} :: ### Fireworks ::ComponentLoader{label="Preview" componentName="ConfettiFireworksDemo" type="examples" id="confetti"} :: ### Side Cannons ::ComponentLoader{label="Preview" componentName="ConfettiCannonsDemo" type="examples" id="confetti"} :: ::alert{type="info"} **Note:** This component uses `canvas-confetti` npm package as a dependency. Install package using following commands. ::code-group ```bash [npm] npm install canvas-confetti npm install -D @types/canvas-confetti ``` ```bash [pnpm] pnpm install canvas-confetti pnpm install -D @types/canvas-confetti ``` ```bash [bun] bun add canvas-confetti bun add -d @types/canvas-confetti ``` ```bash [yarn] yarn add canvas-confetti yarn add --dev @types/canvas-confetti ``` :: :: ## API ::steps ### Confetti | Prop Name | Type | Default | Description | | --------------- | ----------------------- | ------- | ----------------------------------------------------------------- | | `options` | `ConfettiOptions` | `{}` | Options for individual confetti bursts. | | `globalOptions` | `ConfettiGlobalOptions` | `{}` | Global options for the confetti instance (e.g., resize behavior). | | `manualstart` | `boolean` | `false` | If `true`, confetti won't start automatically on mount. | #### `ConfettiOptions` Properties | Property | Type | Default | Description | | ------------------------- | --------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | `particleCount` | `number` | `50` | The number of confetti particles to launch. | | `angle` | `number` | `90` | The angle in degrees at which to launch the confetti. | | `spread` | `number` | `45` | The spread in degrees of the confetti. | | `startVelocity` | `number` | `45` | The initial velocity of the confetti particles. | | `decay` | `number` | `0.9` | The rate at which confetti particles slow down. | | `gravity` | `number` | `1` | The gravity applied to confetti particles. | | `drift` | `number` | `0` | The horizontal drift applied to confetti particles. | | `ticks` | `number` | `200` | The number of animation frames the confetti should last. | | `origin` | `{ x: number, y: number }` | `{ x: 0.5, y: 0.5 }` | The origin point (from 0 to 1) of the confetti emission. | | `colors` | `string[]` | `['#26ccff', '#a25afd', '#ff5e7e', '#88ff5a', '#fcff42', '#ffa62d', '#ff36ff']` | Array of color strings in HEX format for the confetti particles. | | `shapes` | `string[]` | `['square', 'circle']` | Array of shapes for the confetti particles. | | `scalar` | `number` | `1` | Scaling factor for confetti particle sizes. | | `zIndex` | `number` | `100` | The z-index value for the confetti canvas element. | | `disableForReducedMotion` | `boolean` | `false` | Disables confetti for users who prefer reduced motion. | | `useWorker` | `boolean` | `true` | Use a Web Worker for better performance. | | `resize` | `boolean` | `true` | Whether to automatically resize the canvas when the window resizes. | | `canvas` | `HTMLCanvasElement \| null` | `null` | Custom canvas element to draw confetti on. | | `gravity` | `number` | `1` | The gravity applied to confetti particles. | | `drift` | `number` | `0` | The horizontal drift applied to particles. | | `flat` | `boolean` | `false` | If `true`, confetti particles will be flat (no rotation or 3D effect). | ### Confetti Button | Prop Name | Type | Default | Description | | --------- | -------------------------------------------------- | ------- | ------------------------------------------------ | | `options` | `ConfettiOptions & { canvas?: HTMLCanvasElement }` | `{}` | Options for confetti when the button is clicked. | :: ## Component Code You can copy and paste the following code to create these components: ::code-group ::CodeViewerTab{label="Confetti.vue" language="vue" componentName="Confetti" type="ui" id="confetti"} :: ::CodeViewerTab{label="ConfettiButton.vue" language="vue" componentName="ConfettiButton" type="ui" id="confetti"} :: :: ## Features - **Confetti Animation**: Easily add confetti animations to your Vue application. - **Customizable Options**: Configure both global and individual options for confetti behavior. - **Manual Control**: Choose whether to start confetti automatically or manually trigger it. - **Button Integration**: Use the `ConfettiButton` component to trigger confetti on button clicks. ## Credits - Built using the [canvas-confetti](https://www.npmjs.com/package/canvas-confetti) library. - Ported from [Magic UI Confetti](https://magicui.design/docs/components/confetti).
{ "source": "unovue/inspira-ui", "title": "content/2.components/special-effects/confetti.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/special-effects/confetti.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 7998 }
--- title: Glow Border description: An animated border effect. --- ::ComponentLoader{label="Preview" componentName="GlowBorderDemo" type="examples"} :: ::alert{type="warning"} This component uses the `nuxt-only` syntax with the `<ClientOnly>`. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | -------------- | -------------------- | ------- | ---------------------------------------------------------- | | `duration` | `number` | `10` | Duration of the glowing border animation. | | `color` | `string \| string[]` | `#FFF` | Color or array of colors to applied on the glowing border. | | `borderRadius` | `number` | `10` | Radius of the border. | | `borderWidth` | `number` | `2` | Width of the border. | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="GlowBorder.vue" language="vue" componentName="GlowBorder" type="ui" id="glow-border"} :: ## Credits - Credits to [Magic UI](https://magicui.design/docs/components/shine-border) for this fantastic component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/special-effects/glow-border.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/special-effects/glow-border.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1311 }
--- title: Meteor description: A component that displays a meteor shower animation with customizable meteor count and styling. --- ::ComponentLoader{label="Preview" componentName="MeteorsDemo" type="examples"} :: ::alert{type="warning"} This component uses the `nuxt-only` syntax with the `<ClientOnly>`. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | ----------------------------------------------------------------- | | `count` | `number` | `20` | The number of meteors to display in the animation. | | `class` | `string` | `""` | Additional CSS classes to apply to the meteors for customization. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="Meteors.vue" language="vue" componentName="Meteors" type="ui" id="meteors"} :: ## Features - **Meteor Shower Animation**: The component renders an animated meteor shower effect, adding a dynamic visual element to your application. - **Customizable Meteor Count**: Adjust the number of meteors by setting the `count` prop to control the density of the meteor shower. - **Randomized Animations**: Each meteor has randomized position, delay, and duration, creating a natural and varied animation. - **Styling Flexibility**: Pass additional CSS classes through the `class` prop to customize the appearance of the meteors. - **Responsive Design**: The component adapts to different screen sizes and uses Vue’s reactivity for smooth animations. ## Credits - Ported from [Aceternity UI's Meteor Effect](https://ui.aceternity.com/components/meteors)
{ "source": "unovue/inspira-ui", "title": "content/2.components/special-effects/meteors.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/special-effects/meteors.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1747 }
--- title: Particle Image description: Visually appealing particle animation applied to images as seen on NuxtLabs.com --- ::ComponentLoader{label="Preview" componentName="ParticleImageDemo" type="examples"} :: ## API | Prop Name | Type | Default | Description | | ----------------- | ----------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------- | | `imageSrc` | `string` | `null` | Source URL for the image to which the particle effect is applied. | | `class` | `string` | `null` | Additional CSS classes to apply to the image element. | | `canvasWidth` | `string` | `null` | Width of the particle effect canvas. | | `canvasHeight` | `string` | `null` | Height of the particle effect canvas. | | `gravity` | `string` | `null` | Gravity force affecting the particle movement. | | `particleSize` | `string` | `null` | Size of the particles. | | `particleGap` | `string` | `null` | Gap between particles. | | `mouseForce` | `string` | `null` | Force applied to particles based on mouse movement. | | `renderer` | `"default" \| "webgl"` | `null` | The renderer to use for particle generation, either default or WebGL. | | `color` | `string` | `#FFF` | Hexadecimal color code used for particles. Supports 3 or 6 character hex codes. | | `colorArr` | `number[]` | `null` | Array of numbers to define multiple particle colors. | | `initPosition` | `"random" \| "top" \| "left" \| "bottom" \| "right" \| "misplaced" \| "none"` | `random` | Initial position of the particles when the animation starts. | | `initDirection` | `"random" \| "top" \| "left" \| "bottom" \| "right" \| "none"` | `random` | Initial direction of the particles when the animation starts. | | `fadePosition` | `"explode" \| "top" \| "left" \| "bottom" \| "right" \| "random" \| "none"` | `none` | Position where the particles fade out. | | `fadeDirection` | `"random" \| "top" \| "left" \| "bottom" \| "right" \| "none"` | `none` | Direction in which the particles fade out. | | `noise` | `number` | `null` | Noise of the particles. | | `responsiveWidth` | `boolean` | `false` | Should the canvas be responsive. | ## Component Code You can copy and paste the following code to create these components: ::code-group ::CodeViewerTab{label="ParticleImage.vue" icon="vscode-icons:file-type-vue" componentName="ParticleImage" type="ui" id="particle-image"} :: ::CodeViewerTab{label="inspiraImageParticles.js" icon="vscode-icons:file-type-js" componentName="inspiraImageParticles" type="ui" id="particle-image" extension="js"} :: ::CodeViewerTab{label="inspiraImageParticles.d.ts" icon="vscode-icons:file-type-typescriptdef" componentName="inspiraImageParticles" type="ui" id="particle-image" extension="d.ts"} :: :: ## Credits - Credits to [Nuxt Labs](https://nuxtlabs.com) for this inspiration. - Credits to [NextParticles](https://nextparticle.nextco.de) for the base of the animation library.
{ "source": "unovue/inspira-ui", "title": "content/2.components/special-effects/particle-image.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/special-effects/particle-image.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 4710 }
--- title: Scratch To Reveal description: The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath. --- ::ComponentLoader{label="Preview" componentName="ScratchToRevealDemo" type="examples" id="scratch-to-reveal"} :: ## API | Prop Name | Type | Default | Description | | ---------------------- | ------------------------ | ------- | --------------------------------------------------------------------------------------------- | | `class` | `string` | `""` | The class name to apply to the component. | | `width` | `number` | `""` | Width of the scratch container. | | `height` | `number` | `""` | Height of the scratch container. | | `minScratchPercentage` | `number` | `50` | Minimum percentage of scratched area to be considered as completed (Value between 0 and 100). | | `gradientColors` | `[string,string,string]` | `-` | Gradient colors for the scratch effect. | | Event Name | Payload | Description | | ---------- | ------- | -------------------------------------------------- | | `complete` | `-` | Callback function called when scratch is completed | | Slot Name | Default Content | Description | | --------- | --------------- | -------------------------------------- | | `default` | `-` | The text below the scratch-off ticket. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="ScratchToReveal.vue" language="vue" componentName="ScratchToReveal" type="ui" id="scratch-to-reveal"} :: ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired by [MagicUI Scratch To Reveal](https://magicui.design/docs/components/scratch-to-reveal).
{ "source": "unovue/inspira-ui", "title": "content/2.components/special-effects/scratch-to-reveal.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/special-effects/scratch-to-reveal.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2302 }
--- title: 3D Text description: A stylish 3D text component with customizable colors, shadows, and animation options. --- ::ComponentLoader{label="Preview" componentName="Text3dDemo" type="examples"} :: ## API | Prop Name | Type | Default | Description | | ------------------- | --------- | ---------- | -------------------------------------------------- | | `textColor` | `string` | `"white"` | Color of the main text. | | `letterSpacing` | `number` | `-0.1` | Adjusts the spacing between letters in `ch` units. | | `strokeColor` | `string` | `"black"` | Color of the text stroke. | | `shadowColor` | `string` | `"yellow"` | Color of the text shadow. | | `strokeSize` | `number` | `20` | Thickness of the text stroke in pixels. | | `shadow1Size` | `number` | `7` | Size of the first shadow layer in pixels. | | `shadow2Size` | `number` | `10` | Size of the second shadow layer in pixels. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `animate` | `boolean` | `true` | Enables wiggle animation when set to `true`. | | `animationDuration` | `number` | `1500` | Duration of the wiggle animation in milliseconds. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="Text3d.vue" language="vue" componentName="Text3d" type="ui" id="text-3d"} :: ## Features - **3D Text Effect**: Adds a three-dimensional stroke and shadow effect to text for a bold, layered look. - **Customizable Colors & Sizes**: Easily adjust text color, stroke size, shadow colors, and letter spacing. - **Wiggle Animation**: Includes an optional wiggle animation to make the text bounce for added emphasis. - **Flexible Animation Control**: Customize the animation speed with the `animationDuration` prop.
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/3d-text.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/3d-text.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2059 }
--- title: Blur Reveal description: A component to smoothly blur fade in content. --- ::ComponentLoader{label="Preview" componentName="BlurRevealDemo" type="examples"} :: ::alert{type="warning"} This component uses the `nuxt-only` syntax with the `<ClientOnly>`. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | ---------- | -------- | ------- | ---------------------------------------------------------------------------- | | `duration` | `number` | `1` | Duration of the blur fade in animation. | | `delay` | `number` | `1` | Delay between child components to reveal | | `blur` | `string` | `10px` | Amount of blur to apply to the child components. | | `yOffset` | `number` | `20` | Specifies the vertical offset distance (yOffset) for the entrance animation. | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="BlurReveal.vue" language="vue" componentName="BlurReveal" type="ui" id="blur-reveal"} :: ## Credits - Credits to [Magic UI](https://magicui.design/docs/components/blur-fade) for this fantastic component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/blur-reveal.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/blur-reveal.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1339 }
--- title: Box Reveal description: An animated box reveal effect with customizable colors, duration, and delay. --- ::ComponentLoader{label="Preview" componentName="BoxRevealDemo" type="examples"} :: ## API | Prop Name | Type | Default | Description | | ---------- | -------- | ----------- | ---------------------------------------------------- | | `color` | `string` | `"#5046e6"` | Background color of the reveal box. | | `duration` | `number` | `0.5` | Duration of the reveal animation in seconds. | | `delay` | `number` | `0.25` | Delay before the reveal animation starts in seconds. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="BoxReveal.vue" language="vue" componentName="BoxReveal" type="ui" id="box-reveal"} :: ## Features - **Box Reveal Animation**: Creates a sliding box reveal effect with smooth transitions. - **Customizable Animation**: Control the animation timing with the `duration` and `delay` props. - **Slot-Based Content**: Supports default slot content that appears once the reveal animation completes. - **Custom Background Color**: Easily customize the box's background color using the `color` prop. ## Credits - Ported from [Magic UI Box Reveal](https://magicui.design/docs/components/box-reveal).
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/box-reveal.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/box-reveal.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1484 }
--- title: Colourful Text description: A text component with various colours, filter and scale effects. navBadges: - value: New type: lime --- ::ComponentLoader{label="Preview" componentName="ColourfulTextDemo" type="examples" id="colourful-text"} :: ## API | Prop Name | Type | Default | Description | | ------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | `text` | `string` | `"black"` | The text string to be rendered with colorful animated characters. Each character will be individually animated with color transitions and motion effects. | | `colors` | `string[]` | `[ "rgb(131, 179, 32)", "rgb(47, 195, 106)", "rgb(42, 169, 210)", "rgb(4, 112, 202)", "rgb(107, 10, 255)", "rgb(183, 0, 218)", "rgb(218, 0, 171)", "rgb(230, 64, 92)", "rgb(232, 98, 63)", "rgb(249, 129, 47)", ]` | The text use colors. | | `startColor` | `string` | `"rgb(255,255,255)"` | The char start color. | | `duration` | `number` | `5` | The animation duration time in seconds. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="ColourfulText.vue" language="vue" componentName="ColourfulText" type="ui" id="colourful-text"} :: ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Ported from [Aceternity UI Colourful Text](https://ui.aceternity.com/components/colourful-text)
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/colorful-text.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/colorful-text.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 3058 }
--- title: Flip Words description: A component that flips through a list of words. --- ::ComponentLoader{label="Preview" componentName="FlipWordsDemo" type="examples"} :: ## API | Prop Name | Type | Description | | ---------- | -------- | ------------------------------------------------------------------------------------------ | | `words` | `Array` | An array of words to be displayed and animated. | | `duration` | `number` | Duration (in milliseconds) for each word to be displayed before flipping to the next word. | | `class` | `string` | Additional CSS classes to apply to the component. | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="FlipWords.vue" language="vue" componentName="FlipWords" type="ui" id="flip-words"} :: ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Flip Words](https://ui.aceternity.com/components/flip-words)
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/flip-words.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/flip-words.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1162 }
--- title: Hyper Text description: A hyper changing text animation as you hover.. --- ::ComponentLoader{label="Preview" componentName="HyperTextDemo" type="examples"} :: ## API | Prop Name | Type | Default | Description | | --------------- | --------- | -------- | --------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes to apply to the component. | | `text` | `string` | Required | Text to animate | | `duration` | `number` | `0.8` | The total duration (in seconds) for the entire animation. | | `animateOnLoad` | `boolean` | `true` | Play animation on load | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="HyperText.vue" language="vue" componentName="HyperText" type="ui" id="hyper-text"} :: ## Credits - Inspired by [Magic UI's Hyper Text](https://magicui.design/docs/components/hyper-text) component. - Credits to [Prem](https://github.com/premdasvm) for porting this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/hyper-text.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/hyper-text.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1186 }
--- title: Letter Pullup description: Staggered letter pull up text animation. --- ::ComponentLoader{label="Preview" componentName="LetterPullupDemo" type="examples" id="letter-pullup"} :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | -------------------------- | -------------------------------------------------- | | `class` | `string` | `-` | The class to be applied to the component. | | `words` | `string` | `Staggered Letter Pull Up` | Text to animate. | | `delay` | `number` | `0.05` | Delay each letter's animation by this many seconds | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="LetterPullup.vue" language="vue" componentName="LetterPullup" type="ui" id="letter-pullup"} :: ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Inspired from [Magic UI](https://magicui.design/docs/components/letter-pullup).
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/letter-pullup.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/letter-pullup.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1127 }
--- title: Line Shadow Text description: A line shadow text component for Magic UI that adds a shadow effect to the text, making it visually appealing and engaging. navBadges: - value: New type: lime --- ::ComponentLoader{label="Preview" componentName="LineShadowTextDemo" type="examples" id="line-shadow-text"} :: ## API | Prop Name | Type | Default | Description | | ------------- | -------- | --------- | ------------------------------------------ | | `shadowColor` | `string` | `"black"` | The color of the shadow effect | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `as` | `string` | `"span"` | The HTML element to render the text as. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="LineShadowText.vue" language="vue" componentName="LineShadowText" type="ui" id="line-shadow-text"} :: ## Features - **Slot-Based Content**: Supports default slots for dynamic content, making it flexible for various use cases. ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Ported from [Magic UI's Line Shadow Text](https://magicui.design/docs/components/line-shadow-text)
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/line-shadow-text.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/line-shadow-text.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1304 }
--- title: Morphing Text description: This MorphingText component dynamically transitions between an array of text strings, creating a smooth, engaging visual effect. --- ::ComponentLoader{label="Preview" componentName="MorphingTextDemo" type="examples" id="morphing-text"} :: ::alert{type="warning"} This component uses the `nuxt-only` syntax with the `<ClientOnly>`. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | -------------- | ---------- | ------- | ------------------------------------- | | `texts` | `string[]` | `[]` | Array of texts to morph between. | | `class` | `string` | `""` | Additional classes for the container. | | `morphTime` | `number` | `1.5` | Animation execution time. | | `coolDownTime` | `number` | `0.5` | Animation dwell time. | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="MorphingText.vue" language="vue" componentName="MorphingText" type="ui" id="morphing-text"} :: ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [Magic UI Morphing Text](https://magicui.design/docs/components/morphing-text).
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/morphing-text.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/morphing-text.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1333 }
--- title: Number Ticker description: Animate numbers to count up or down to a target number --- ::ComponentLoader{label="Preview" componentName="NumberTickerDemo" type="examples"} :: --- ## API | Prop Name | Type | Default | Description | | --------------- | ------------------- | -------------- | ----------------------------------------------------------------- | | `value` | `int` | `0` | Value to count to | | `direction` | `up \| down` | `up` | Direction to count in | | `decimalPlaces` | `number` | `0` | Number of decimal places to show | | `delay` | `number` | `0` | Delay before counting (in milliseconds) | | `duration` | `number` | `1000` | Total duration for the entire animation (in milliseconds). | | `transition` | `TransitionPresets` | `easeOutCubic` | Name of transition preset (https://vueuse.org/core/useTransition) | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="NumberTicker.vue" language="vue" componentName="NumberTicker" type="ui" id="number-ticker"} :: ## Credits - Credits to [Grzegorz Krol](https://github.com/Grzechu335) for porting this component. - Ported from [Magic UI NumberTicker](https://magicui.design/docs/components/number-ticker).
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/number-ticker.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/number-ticker.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1615 }
--- title: Radiant Text description: A glare effect on text. --- ::ComponentLoader{label="Preview" componentName="RadiantTextDemo" type="examples"} :: ## API | Prop Name | Type | Default | Description | | -------------- | -------- | ------- | ------------------------------------- | | `duration` | `number` | `10` | Duration of the animation in seconds. | | `radiantWidth` | `number` | `100` | Width of the radiant animation. | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="RadiantText.vue" language="vue" componentName="RadiantText" type="ui" id="radiant-text"} :: ## Credits - Credits to [Magic UI](https://magicui.design/docs/components/animated-shiny-text) for this fantastic component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/radiant-text.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/radiant-text.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 813 }
--- title: Sparkles Text description: A dynamic text that generates continuous sparkles with smooth transitions, perfect for highlighting text with animated stars. --- ::ComponentLoader{label="Preview" componentName="SparklesTextDemo" type="examples" id="sparkles-text"} :: ## API | Prop Name | Type | Default | Description | | --------------- | -------- | ---------------------------------------- | --------------------------------------------- | | `class` | `string` | `-` | The class to be applied to the sparkles text. | | `text` | `string` | `` | The text to display. | | `sparklesCount` | `number` | `10` | sparkles count that appears on the text. | | `colors` | `object` | `{first: '#A07CFE'; second: '#FE8FB5';}` | The sparkles colors. | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="SparklesText.vue" language="vue" componentName="SparklesText" type="ui" id="sparkles-text"} :: ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Inspired from [Magic UI](https://magicui.design/docs/components/sparkles-text). - Credits to [M Atif](https://github.com/atif0075) for updating this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/sparkles-text.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/sparkles-text.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1489 }
--- title: Text Generate Effect description: A cool text effect that fades in text on page load, one by one. --- ::ComponentLoader{label="Preview" componentName="TextGenerateDemo" type="examples"} :: ## Examples Two text with different delay ::ComponentLoader{label="Preview" componentName="TextGenerateEffectDemoDelayed" type="examples" id="text-generate-effect"} :: ::alert{type="warning"} This component uses the `nuxt-only` syntax with the `<ClientOnly>`. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | ---------- | --------- | -------- | ---------------------------------------------------------------------- | | `words` | `string` | Required | The text to be displayed with the generating effect. | | `duration` | `number` | `0.7` | The duration of the text generation animation in seconds. | | `delay` | `number` | `0` | The delay before the text generation animation starts in milliseconds. | | `filter` | `boolean` | `true` | The blur of the text. | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="TextGenerateEffect.vue" language="vue" componentName="TextGenerateEffect" type="ui" id="text-generate-effect"} :: ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Text Generate Effect](https://ui.aceternity.com/components/text-generate-effect).
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/text-generate-effect.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/text-generate-effect.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1631 }
--- title: Text Highlight description: A text effect that fill background of a text to highlight it. --- ::ComponentLoader{label="Preview" componentName="TextHighlightDemo" type="examples" id="text-highlight"} :: ## Examples With 3s delay ::ComponentLoader{label="Preview" componentName="TextHighlightDemoDelayed" type="examples" id="text-highlight"} :: Rounded text background ::ComponentLoader{label="Preview" componentName="TextHighlightDemoRounded" type="examples" id="text-highlight"} :: Color from CSS variables: use the paintbrush icon in the top right corner to change the color. ::ComponentLoader{label="Preview" componentName="TextHighlightDemoColorsFromCssVariable" type="examples" id="text-highlight"} :: With text color change. ::ComponentLoader{label="Preview" componentName="TextHighlightDemoTextColorChange" type="examples" id="text-highlight"} :: ## API | Prop Name | Type | Default | Description | | ---------------- | -------- | --------- | -------------------------------------------------------------------------- | | `delay` | `number` | `0` | Delay before the animation starts, in `ms`. | | `duration` | `number` | `2000` | Duration of the animation, in `ms`. | | `text-end-color` | `string` | `inherit` | Color of the text at the end of the animation. Match WCAG recommendations. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="TextHighlight.vue" language="vue" componentName="TextHighlight" type="ui" id="text-highlight"} :: ## Credits - Inspired by [Aceternity UI](https://ui.aceternity.com/components/hero-highlight) - Credits to [Nathan De Pachtere](https://nathandepachtere.com) for porting this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/text-highlight.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/text-highlight.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1885 }
--- title: Text Hover Effect description: A text hover effect that animates and outlines gradient on hover, as seen on x.ai --- ::ComponentLoader{label="Preview" componentName="TextHoverEffectDemo" type="examples"} :: ::alert{type="warning"} This component uses the `nuxt-only` syntax with the `<ClientOnly>`. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | ------------- | -------- | -------- | --------------------------------------------------------- | | `text` | `string` | Required | The text to be displayed with the hover effect. | | `duration` | `number` | `200` | The duration of the mask transition animation in seconds. | | `strokeWidth` | `number` | `0.75` | The width of the text stroke. | | `opacity` | `number` | `null` | The opacity of the text. | ## Component Code You can copy and paste the following code to create these components: ::CodeViewer{filename="TextHoverEffect.vue" language="vue" componentName="TextHoverEffect" type="ui" id="text-hover-effect"} ::
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/text-hover-effect.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/text-hover-effect.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1195 }
--- title: Text Reveal Card description: Mousemove effect to reveal text content at the bottom of the card. --- ::ComponentLoader{label="Preview" componentName="TextRevealDemo" type="examples"} :: ## API | Prop Name | Type | Description | | ---------- | -------- | ---------------------------------------------------------------- | | class | `String` | Additional classes to be added to the card. | | starsCount | `Number` | Control the number of stars that are generated | | starsClass | `String` | Additional classes to be added to the stars floating on content. | | Slot Name | Description | | ---------- | ------------------------------------------------------- | | header | `String` | | text | Display default text when the card is not hovered over. | | revealText | Text to be revealed when hovered over the card. | ## Component Code You can copy and paste the following code to create these components: ::code-group ::CodeViewerTab{label="TextRevealCard.vue" language="vue" componentName="TextRevealCard" type="ui" id="text-reveal-card"} :: ::CodeViewerTab{label="TextRevealStars.vue" language="vue" componentName="TextRevealStars" type="ui" id="text-reveal-card"} :: :: ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Text Reveal Card](https://ui.aceternity.com/components/text-reveal-card).
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/text-reveal-card.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/text-reveal-card.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1614 }
--- title: Text Scroll Reveal description: A component that reveals text word by word as you scroll, with customizable text and styling. --- ::ComponentLoader{label="Preview" componentName="TextScrollRevealDemo" type="examples"} :: ::alert{type="warning"} This component uses the `nuxt-only` syntax with the `<ClientOnly>`. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | ------------------------------------------------------------------- | | `text` | `string` | N/A | The text content to display and reveal word by word during scroll. | | `class` | `string` | `""` | Additional CSS classes to apply to the component for customization. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="TextScrollReveal.vue" language="vue" componentName="TextScrollReveal" type="ui" id="text-scroll-reveal"} :: ::CodeViewerTab{label="ScrollWord.vue" language="vue" componentName="ScrollWord" type="ui" id="text-scroll-reveal"} :: :: ## Features - **Scroll-Activated Text Reveal**: The component reveals the provided text word by word as the user scrolls, creating an engaging visual effect. - **Customizable Text Content**: Set the `text` prop to display any text content you wish to reveal during scroll. - **Smooth Animations**: Each word's opacity transitions smoothly based on scroll position, providing a visually appealing experience. - **Styling Flexibility**: Use the `class` prop to pass additional CSS classes for custom styling. - **Reactive Design**: The component uses Vue's reactivity system to update the scroll progress and word visibility in real-time. ## Credits - Ported from [Magic UI Text Reveal](https://magicui.design/docs/components/text-reveal).
{ "source": "unovue/inspira-ui", "title": "content/2.components/text-animations/text-scroll-reveal.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/text-animations/text-scroll-reveal.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1913 }
--- title: 3D Carousel description: A dynamic and interactive 3D carousel component using Three.js and Motion-V, allowing smooth infinite rotation and user-controlled interactions. navBadges: - value: New type: lime --- ::ComponentLoader{label="Preview" componentName="Carousel3dDemo" type="examples" id="carousel-3d"} :: ## API | Prop Name | Type | Default | Description | | ---------------- | ----------- | ------- | ----------------------------------------------------------- | | `items` | `unknown[]` | `[]` | List of images or elements to be displayed in the carousel. | | `class` | `string` | `""` | Additional CSS classes for styling the carousel overlay. | | `containerClass` | `string` | `""` | CSS classes for styling the carousel container. | | `width` | `number` | `450` | Width of individual carousel items. | | `height` | `number` | `600` | Height of individual carousel items. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="Carousel3D.vue" language="vue" componentName="Carousel3D" type="ui" id="carousel-3d"} :: :: ## Features - **3D Rotating Carousel**: Displays a rotating 3D carousel using Three.js. - **Smooth Infinite Rotation**: The carousel continuously rotates smoothly. - **User Interaction Support**: Supports mouse and touch interactions to manually rotate the carousel. - **Fully Responsive**: Adapts to different screen sizes dynamically. - **Performance Optimized**: Utilizes Motion-V for smooth animations and easing functions. - **Dynamic Item Rendering**: Accepts an array of items to render in the carousel dynamically. - **Dark Mode Support**: Adaptable to dark and light themes for better UI consistency. ## Credits - Built using Three.js for 3D rendering. - Utilizes Motion-V for seamless animations. - Thanks [@safakdinc](https://github.com/safakdinc) for sharing this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/visualization/carousal-3d.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/visualization/carousal-3d.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2104 }
--- title: File Tree description: A component used to showcase the folder and file structure of a directory. navBadges: - value: New type: lime --- ::ComponentLoader{label="Preview" componentName="FileTreeDemo" type="examples"} :: ## API ::steps ### `Tree` The `Tree` component serves as a container for displaying a hierarchical file/folder structure. #### Props | Prop Name | Type | Default | Description | | ---------------------- | ------------------- | ---------------------- | -------------------------------------------------- | | `class` | `string` | - | Additional classes for styling the tree container. | | `initialSelectedId` | `string` | - | ID of the initially selected item. | | `indicator` | `boolean` | `true` | Whether to show the tree indicator line. | | `elements` | `TreeViewElement[]` | - | Array of tree elements to display. | | `initialExpandedItems` | `string[]` | - | Array of IDs of initially expanded folders. | | `openIcon` | `string` | `"lucide:folder-open"` | Icon to show for open folders. | | `closeIcon` | `string` | `"lucide:folder"` | Icon to show for closed folders. | | `fileIcon` | `string` | `"lucide:file"` | Icon to show for files. | | `direction` | `"rtl" \| "ltr"` | `"ltr"` | Text direction of the tree. | #### Usage ```vue [MyComponent.vue] <Tree initialSelectedId="1" :initial-expanded-items="['1', '2']" :elements="ELEMENTS"> <!-- Your structure here --> </Tree> ``` ### `Folder` and `File` The `Folder` and `File` components represent folders and files in the file tree. Folders can contain other `Folder` and `File` components. #### Props | Prop Name | Type | Default | Description | | -------------- | --------- | ------- | --------------------------------------- | | `class` | `string` | - | Additional classes for custom styling. | | `id` | `string` | - | Unique identifier for the item. | | `name` | `string` | - | Display name of the folder/file. | | `isSelectable` | `boolean` | `true` | Whether the item can be selected. | | `isSelect` | `boolean` | `false` | Whether the item is currently selected. | #### Usage ```vue [MyComponent.vue] <Folder id="1" name="root"> <Folder id="2" name="components"> <File id="3" name="Button.vue" /> <File id="4" name="Card.vue" /> </Folder> </Folder> ``` :: ## Component Code You can copy and paste the following code to create these components: ::code-group ::CodeViewerTab{label="Tree.vue" icon="vscode-icons:file-type-vue" componentName="Tree" type="ui" id="file-tree"} :: ::CodeViewerTab{label="Folder.vue" icon="vscode-icons:file-type-vue" componentName="Folder" type="ui" id="file-tree"} :: ::CodeViewerTab{label="File.vue" icon="vscode-icons:file-type-vue" componentName="File" type="ui" id="file-tree"} :: ::CodeViewerTab{label="TreeIndicator.vue" icon="vscode-icons:file-type-vue" componentName="TreeIndicator" type="ui" id="file-tree"} :: ```ts [index.ts] import type { HTMLAttributes } from "vue"; export interface TreeProps { class?: HTMLAttributes["class"]; initialSelectedId: string; indicator?: boolean; elements: TreeViewElement[]; initialExpandedItems: string[]; openIcon?: string; closeIcon?: string; fileIcon?: string; direction?: "rtl" | "ltr"; } export interface TreeContextProps { selectedId: Ref<string | undefined>; expandedItems: Ref<string[] | undefined>; indicator: boolean; openIcon: string; closeIcon: string; fileIcon: string; direction: "rtl" | "ltr"; handleExpand: (id: string) => void; selectItem: (id: string) => void; setExpandedItems: (items: string[] | undefined) => void; } export interface TreeViewElement { id: string; name: string; isSelectable?: boolean; children?: TreeViewElement[]; } export interface BaseItemProps { class?: HTMLAttributes["class"]; id: string; name: string; isSelectable?: boolean; isSelect?: boolean; } export interface FolderProps extends BaseItemProps {} export interface FileProps extends BaseItemProps {} export const TREE_CONTEXT_SYMBOL = Symbol("TREE_CONTEXT_SYMBOL"); export { default as Tree } from "./Tree.vue"; export { default as Folder } from "./Folder.vue"; export { default as File } from "./File.vue"; ``` :: ## Credits - Inspired by [Magic UI](https://magicui.design/docs/components/file-tree). - Credit to [kalix127](https://github.com/kalix127) for porting this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/visualization/file-tree.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/visualization/file-tree.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 4977 }
--- title: Github Globe description: A 3D interactive globe visualization with customizable arcs, points, and animation options inspired from Github. --- ::ComponentLoader{label="Preview" componentName="GithubGlobeDemo" type="examples" id="globe"} :: ::alert{type="info"} **Note:** This component uses Three.js & requires `three`, `three-globe` & `postprocessing` npm package as a dependency. Please install Three.js using following commands. ::code-group ```bash [npm] npm install three postprocessing three-globe npm install -D @types/three ``` ```bash [pnpm] pnpm install three postprocessing three-globe pnpm install -D @types/three ``` ```bash [bun] bun add three postprocessing three-globe bun add -d @types/three ``` ```bash [yarn] yarn add three postprocessing three-globe yarn add --dev @types/three ``` :: :: ::alert{type="warning"} **For Nuxt users**: Use `<ClientOnly>` tag to wrap this component to avoid `window is not defined` error. :: ## API | Prop Name | Type | Default | Description | | ------------- | ------------ | ------- | --------------------------------------------------------------------------------------------------- | | `globeConfig` | `object` | `{}` | Configuration options for the globe, including colors, atmosphere, rotation speed, and lighting. | | `data` | `Position[]` | `[]` | Array of positions representing arcs and points on the globe, with latitude, longitude, color, etc. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ### `globeConfig` Properties | Property | Type | Default | Description | | -------------------- | --------- | ----------------------- | -------------------------------------------------------- | | `pointSize` | `number` | `1` | Size of individual points on the globe. | | `globeColor` | `string` | `"#1d072e"` | Color of the globe surface. | | `showAtmosphere` | `boolean` | `true` | Whether to display atmosphere around the globe. | | `atmosphereColor` | `string` | `"#ffffff"` | Color of the atmosphere around the globe. | | `atmosphereAltitude` | `number` | `0.1` | Altitude of the atmosphere layer. | | `emissive` | `string` | `"#000000"` | Emissive color for the globe material. | | `emissiveIntensity` | `number` | `0.1` | Intensity of the emissive color. | | `shininess` | `number` | `0.9` | Shininess of the globe material. | | `polygonColor` | `string` | `rgba(255,255,255,0.7)` | Color of polygon boundaries on the globe. | | `arcTime` | `number` | `2000` | Duration for arcs animation. | | `arcLength` | `number` | `0.9` | Length of arcs on the globe. | | `rings` | `number` | `1` | Number of rings to display per point. | | `maxRings` | `number` | `3` | Maximum rings around each point. | | `initialPosition` | `object` | `{ lat: 0, lng: 0 }` | Initial latitude and longitude for the globe's position. | | `autoRotate` | `boolean` | `false` | Automatically rotate the globe. | | `autoRotateSpeed` | `number` | `0.8` | Speed of auto-rotation when enabled. | ### `data` Structure (Position) | Field | Type | Description | | ---------- | -------- | ----------------------------------------------- | | `order` | `number` | Order of the point or arc for sequencing. | | `startLat` | `number` | Starting latitude for an arc. | | `startLng` | `number` | Starting longitude for an arc. | | `endLat` | `number` | Ending latitude for an arc. | | `endLng` | `number` | Ending longitude for an arc. | | `arcAlt` | `number` | Altitude of the arc (determines arc height). | | `color` | `string` | Color of the arc or point in hex or RGB format. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="GithubGlobe.vue" language="vue" componentName="GithubGlobe" type="ui" id="github-globe"} :: ## Features - **3D Interactive Globe**: A Three.js-based globe with interactive controls and orbit support. - **Customizable Globe & Atmosphere**: Allows configuration of globe color, atmosphere visibility, and colors. - **Arcs & Points Visualization**: Display arcs and points on the globe, simulating connections and locations. - **Auto-Rotate and Zoom**: Supports auto-rotation, zoom, and customizable controls for a dynamic experience. - **Responsive Design**: Adapts to container size and maintains performance with WebGL rendering. ## Credits - Built with Three.js and Three Globe libraries, designed for global data visualizations and dynamic effects. - Ported from [Aceternity UI](https://ui.aceternity.com/components/github-globe).
{ "source": "unovue/inspira-ui", "title": "content/2.components/visualization/github-globe.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/visualization/github-globe.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 5662 }
--- title: Globe description: An interactive rotating globe component. --- ::ComponentLoader{label="Preview" componentName="GlobeDemo" type="examples" id="globe"} :: ::alert **Note:** This component requires `cobe` and `vue-use-spring` as a dependency. Please install these using following commands. ::code-group ```bash [npm] npm install cobe vue-use-spring ``` ```bash [pnpm] pnpm install cobe vue-use-spring ``` ```bash [bun] bun add cobe vue-use-spring ``` ```bash [yarn] yarn add cobe vue-use-spring ``` :: :: ## API | Prop Name | Type | Default | Description | | ----------- | ------------- | ------- | ----------------------------------------------------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `config` | `COBEOptions` | N/A | Configuration object for the globe, following **[COBE]**(https://cobe.vercel.app/docs/api) library options. | | `mass` | `number` | `1` | Mass parameter for the spring animation controlling rotation inertia. | | `tension` | `number` | `280` | Tension parameter for the spring animation, affecting responsiveness. | | `friction` | `number` | `100` | Friction parameter for the spring animation, affecting damping. | | `precision` | `number` | `0.001` | Precision parameter for the spring animation calculations. | ## Component Code You can copy and paste the following code to create this component: ::CodeViewer{filename="Globe.vue" language="vue" componentName="Globe" type="ui" id="globe"} :: ## Features - **Interactive 3D Globe**: Provides an interactive 3D globe visualization that users can rotate with mouse or touch interactions. - **Customizable Markers**: Display markers on the globe at specified locations with customizable sizes. - **Smooth Animations**: Utilizes physics-based spring animations for smooth and responsive globe rotations. - **Configurable Appearance**: Customize the globe's appearance and behavior through the `config` prop using COBE library options. - **Responsive Design**: Automatically adjusts to different screen sizes and resolutions. ## Credits - Built using the [cobe](https://github.com/shuding/cobe) library for WebGL globe visualization. - Ported from [Magic UI](https://magicui.design/docs/components/globe).
{ "source": "unovue/inspira-ui", "title": "content/2.components/visualization/globe.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/visualization/globe.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2755 }
--- title: Icon Cloud description: An interactive 3D tag cloud component navBadges: - value: New type: lime --- ::ComponentLoader{label="Preview" componentName="IconCloudDemo" type="examples"} :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | --------------------------------------------- | | `class` | `string` | - | Additional classes for styling the component. | | `images` | `array` | `[]` | Array of image URLs to render in the cloud | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{filename="IconCloud.vue" language="vue" componentName="IconCloud" type="ui" id="icon-cloud"} :: ::CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="icon-cloud" extension="ts"} :: :: ## Credits - Inspired by [MagicUI](https://magicui.design/docs/components/icon-cloud). - Credits to [kalix127](https://github.com/kalix127) for porting this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/visualization/icon-cloud.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/visualization/icon-cloud.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1058 }
--- title: Liquid Logo description: An advanced WebGL-based component that applies a dynamic, liquid effect to logos or images using custom shaders. navBadges: - value: New type: lime --- ::ComponentLoader{label="Preview" componentName="LiquidLogoDemo" type="examples" id="liquid-logo"} :: ## API | Prop Name | Type | Default | Description | | -------------- | -------- | ------- | -------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `imageUrl` | `string` | `""` | URL of the image to apply the liquid effect. | | `patternScale` | `number` | `2` | Scale of the distortion pattern. | | `refraction` | `number` | `0.015` | Amount of refraction applied to the image. | | `edge` | `number` | `0.4` | Sharpness of the edge effect. | | `patternBlur` | `number` | `0.005` | Blur effect applied to the pattern. | | `liquid` | `number` | `0.07` | Intensity of the liquid animation. | | `speed` | `number` | `0.3` | Animation speed of the liquid effect. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="LiquidLogo.vue" language="vue" componentName="LiquidLogo" type="ui" id="liquid-logo"} :: ::CodeViewerTab{label="parseLogoImage.ts" language="typescript" componentName="parseLogoImage" type="ui" id="liquid-logo" extension="ts"} :: ::CodeViewerTab{label="shader.ts" language="typescript" componentName="shader" type="ui" id="liquid-logo" extension="ts"} :: :: ## Features - **Dynamic Liquid Effect**: Transforms logos or images with a fluid, liquid-like motion. - **Custom Shader Utilization**: Built with WebGL2 and GLSL shaders for real-time rendering. - **Interactive Animations**: Smooth and configurable animation effects. - **Responsive Scaling**: Automatically adjusts to different screen sizes and resolutions. - **Configurable Parameters**: Offers a wide range of props to control effects like refraction, speed, and edge sharpness. ## Credits - Inspired by the Apple Fluid Motion design. - Ported and enhaced from [Paper Design Concept](https://github.com/paper-design/liquid-logo).
{ "source": "unovue/inspira-ui", "title": "content/2.components/visualization/liquid-logo.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/visualization/liquid-logo.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2323 }
--- title: Animated Logo Cloud description: Animated company cloud logs. Usually we can use to show company logos. --- ::ComponentLoader{label="Preview" componentName="StaticLogoCloudDemo" type="examples" id="logo-cloud"} :: ## Examples ### Animated logs Animated company logos. ::ComponentLoader{label="Preview" componentName="AnimatedLogoCloudDemo" type="examples" id="logo-cloud"} :: ### Icon Logo Company logo icons ::ComponentLoader{label="Preview" componentName="IconLogoCloudDemo" type="examples" id="logo-cloud"} :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | --------------------------- | -------------------------------------------------------------- | | `class` | `string` | `-` | The delay in milliseconds before adding each item to the list. | | `title` | `string` | `Trusted by Companies like` | Title of animated logs. | | `logos` | `[]` | `[{name: "", path: ""}]` | Array of items(logos) with name & path fields. | ## Component Code You can copy and paste the following code to create this component: ::CodeGroup ::CodeViewerTab{label="StaticLogoCloud.vue" language="vue" componentName="StaticLogoCloud" type="ui" id="logo-cloud"} :: ::CodeViewerTab{label="AnimatedLogoCloud.vue" language="vue" componentName="AnimatedLogoCloud" type="ui" id="logo-cloud"} :: ::CodeViewerTab{label="IconLogoCloud.vue" language="vue" componentName="IconLogoCloud" type="ui" id="logo-cloud"} :: ::CodeViewerTab{filename="index.ts" language="ts" componentName="index" type="ui" id="logo-cloud" extension="ts"} :: :: ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/visualization/logo-cloud.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/visualization/logo-cloud.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1830 }
--- title: Logo Origami description: Animated flipping logo with origami effect. --- ::ComponentLoader{label="Preview" componentName="LogoOrigamiDemo" type="examples"} :: ## API | Prop Name | Type | Default | Description | | ---------- | -------- | ------- | ------------------------------------------ | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `duration` | `number` | `1.5` | Duration of the flip animation in seconds. | | `delay` | `number` | `2.5` | Delay between flip animations in seconds. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="LogoOrigami.vue" language="vue" componentName="LogoOrigami" type="ui" id="logo-origami"} :: :CodeViewerTab{label="LogoOrigamiItem.vue" language="vue" componentName="LogoOrigamiItem" type="ui" id="logo-origami"} :: :: ## Features - **Origami Flip Animation**: Animates flipping between multiple child components with an origami-style effect. - **Customizable Timing**: Adjust the `duration` and `delay` props to control the animation speed and interval. - **Slot-Based Content**: Accepts multiple child components or content via default slots. - **Responsive Design**: Designed to adapt to various screen sizes and devices. - **Easy Integration**: Simple to include in your Vue projects with minimal setup. ## Credits - Inspired by origami animations and flip effects at [hover.dev](www.hover.dev/components/other#logo-origami)
{ "source": "unovue/inspira-ui", "title": "content/2.components/visualization/logo-origami.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/visualization/logo-origami.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 1564 }
--- title: Orbit description: A component that animates content in a circular orbit, with customizable duration, delay, and radius. It also offers an optional orbit path display. --- ::ComponentLoader{label="Preview" componentName="OrbitDemo" type="examples"} :: ## Examples Synchronized orbit ::ComponentLoader{label="Preview" componentName="OrbitDemoSynchronized" type="examples"} :: ## API | Prop Name | Type | Default | Description | | ----------- | --------------------- | -------- | --------------------------------------------------------------------- | | `direction` | `normal` \| `reverse` | `normal` | The direction of the orbit. You can use the constant ORBIT_DIRECTION. | | `duration` | `?number` | `20` | The duration of the orbit animation in seconds. | | `delay` | `?number` | `10` | Delay in seconds before the animation starts. | | `radius` | `?number` | `50` | Radius of the orbit path in pixels. | | `path` | `?boolean` | `false` | Displays a circle path for the orbit if `true`. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{filename="Orbit.vue" language="vue" componentName="Orbit" type="ui" id="orbit"} :: ::CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="orbit" extension="ts"} :: :: ## Features - **Circular Orbit Animation**: The component animates its content in a smooth circular orbit around the center point. - **Customizable Animation**: The orbit’s duration, delay, and radius are fully adjustable, providing flexibility in animation behavior. - **Optional Orbit Path**: An optional visual representation of the orbit path can be toggled using the `path` prop. - **Reversibility**: The orbit direction can be `reverse` by setting the `direction` prop. - **Responsive and Efficient**: The component handles different container sizes and uses Vue’s reactivity to ensure efficient animation. ## Credits - Inspired by [Magic UI](https://magicui.design/docs/components/orbiting-circles). - Credits to [Nathan De Pachtere](https://nathandepachtere.com/) for updating this component.
{ "source": "unovue/inspira-ui", "title": "content/2.components/visualization/orbit.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/2.components/visualization/orbit.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 2398 }
--- title: Hero description: Elevate website experience with unique hero blocks. --- ### Hero Section 1 ::ComponentLoader{label="Preview" componentName="HeroSection1" type="blocks" id="hero"} :: #### Components used: - [Falling Stars Background](https://inspira-ui.com/components/backgrounds/falling-stars) - [Blur Reveal](https://inspira-ui.com/components/text-animations/blur-reveal) - [Flip Words](https://inspira-ui.com/components/text-animations/flip-words) - [Border Beam](https://inspira-ui.com/components/special-effects/border-beam) ### Hero Section 2 ::ComponentLoader{label="Preview" componentName="HeroSection2" type="blocks" id="hero"} :: #### Components used: - [Vortex Background](https://inspira-ui.com/components/backgrounds/vortex) - [Animated Tooltip](https://inspira-ui.com/components/miscellaneous/animated-tooltip) - [Text Highlight](https://inspira-ui.com/components/text-animations/text-highlight) - [3D Card](https://inspira-ui.com/components/cards/3d-card)
{ "source": "unovue/inspira-ui", "title": "content/3.blocks/miscellaneous/hero.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/3.blocks/miscellaneous/hero.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 990 }
--- title: Testimonials description: Show testimonials in style --- ### With skewed marquee ::ComponentLoader{label="Preview" componentName="SkewedMarqueeTestimonials" type="blocks" id="testimonials"} :: ### With linear marquee ::ComponentLoader{label="Preview" componentName="LinearMarqueeTestimonials" type="blocks" id="testimonials"} :: #### Components used - [Marquee & Review](https://inspira-ui.com/components/miscellaneous/marquee) component.
{ "source": "unovue/inspira-ui", "title": "content/3.blocks/miscellaneous/testimonials.md", "url": "https://github.com/unovue/inspira-ui/blob/main/content/3.blocks/miscellaneous/testimonials.md", "date": "2024-08-30T08:20:57", "stars": 1788, "description": "Build beautiful website using Vue & Nuxt.", "file_size": 455 }
# Oasis 500M ![](./media/arch.png) ![](./media/thumb.png) Oasis is an interactive world model developed by [Decart](https://www.decart.ai/) and [Etched](https://www.etched.com/). Based on diffusion transformers, Oasis takes in user keyboard input and generates gameplay in an autoregressive manner. We release the weights for Oasis 500M, a downscaled version of the model, along with inference code for action-conditional frame generation. For more details, see our [joint blog post](https://oasis-model.github.io/) to learn more. And to use the most powerful version of the model, be sure to check out the [live demo](https://oasis.us.decart.ai/) as well! ## Setup ``` git clone https://github.com/etched-ai/open-oasis.git cd open-oasis # Install pytorch pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121 # Install other dependencies pip install einops diffusers timm av ``` ## Download the model weights Inside the `open-oasis/` directory, run: ``` huggingface-cli login huggingface-cli download Etched/oasis-500m oasis500m.safetensors # DiT checkpoint huggingface-cli download Etched/oasis-500m vit-l-20.safetensors # ViT VAE checkpoint ``` ## Basic Usage We include a basic inference script that loads a prompt frame from a video and generates additional frames conditioned on actions. ``` python generate.py # Or specify path to checkpoints: python generate.py --oasis-ckpt <path to oasis500m.safetensors> --vae-ckpt <path to vit-l-20.safetensors> ``` Use a custom image prompt: ``` python generate.py --prompt-path <path to .png, .jpg, or .jpeg> ``` The resulting video will be saved to `video.mp4`. Here's are some examples of a generation from this 500M model! ![](media/sample_0.gif) ![](media/sample_1.gif)
{ "source": "etched-ai/open-oasis", "title": "README.md", "url": "https://github.com/etched-ai/open-oasis/blob/master/README.md", "date": "2024-10-31T09:10:45", "stars": 1747, "description": "Inference script for Oasis 500M", "file_size": 1758 }
[![LinkedIn](https://img.shields.io/badge/LinkedIn-follow-blue)](https://www.linkedin.com/company/athina-ai/posts/?feedView=all)&nbsp; [![Twitter](https://img.shields.io/twitter/follow/AthinaAI?label=Follow%20@AthinaAI&style=social)](https://x.com/AthinaAI)&nbsp; [![Share](https://img.shields.io/badge/share-000000?logo=x&logoColor=white)](https://x.com/intent/tweet?text=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/athina-ai/rag-cookbooks)&nbsp; [![Share](https://img.shields.io/badge/share-0A66C2?logo=linkedin&logoColor=white)](https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/athina-ai/rag-cookbooks)&nbsp; [![Share](https://img.shields.io/badge/share-FF4500?logo=reddit&logoColor=white)](https://www.reddit.com/submit?title=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/athina-ai/rag-cookbooks) >If you find this repository helpful, please consider giving it a star⭐️ # Advanced + Agentic RAG Cookbooks👨🏻‍💻 Welcome to the comprehensive collection of advanced + agentic Retrieval-Augmented Generation (RAG) techniques. ## Introduction🚀 RAG is a popular method that improves accuracy and relevance by finding the right information from reliable sources and transforming it into useful answers. This repository covers the most effective advanced + agentic RAG techniques with clear implementations and explanations. The main goal of this repository is to provide a helpful resource for researchers and developers looking to use advanced RAG techniques in their projects. Building these techniques from scratch takes time, and finding proper evaluation methods can be challenging. This repository simplifies the process by offering ready-to-use implementations and guidance on how to evaluate them. >[!NOTE] >This repository starts with naive RAG as a foundation and progresses to advanced and agentic techniques. It also includes research papers/references for each RAG technique, which you can explore for further reading. ## Introduction to RAG💡 Large Language Models are trained on a fixed dataset, which limits their ability to handle private or recent information. They can sometimes "hallucinate", providing incorrect yet believable answers. Fine-tuning can help but it is expensive and not ideal for retraining again and again on new data. The Retrieval-Augmented Generation (RAG) framework addresses this issue by using external documents to improve the LLM's responses through in-context learning. RAG ensures that the information provided by the LLM is not only contextually relevant but also accurate and up-to-date. ![final diagram](https://github.com/user-attachments/assets/508b3a87-ac46-4bf7-b849-145c5465a6c0) There are four main components in RAG: **Indexing:** First, documents (in any format) are split into chunks, and embeddings for these chunks are created. These embeddings are then added to a vector store. **Retriever:** Then, the retriever finds the most relevant documents based on the user's query, using techniques like vector similarity from the vector store. **Augment:** After that, the Augment part combines the user's query with the retrieved context into a prompt, ensuring the LLM has the information needed to generate accurate responses. **Generate:** Finally, the combined query and prompt are passed to the model, which then generates the final response to the user's query. These components of RAG allow the model to access up-to-date, accurate information and generate responses based on external knowledge. However, to ensure RAG systems are functioning effectively, it’s essential to evaluate their performance. ## RAG Evaluation📊 Evaluating RAG applications is important for understanding how well these systems work. We can see how effectively they combine information retrieval with generative models by checking their accuracy and relevance. This evaluation helps improve RAG applications in tasks like text summarization, chatbots, and question-answering. It also identifies areas for improvement, ensuring that these systems provide trustworthy responses as information changes. Overall, effective evaluation helps optimize performance and builds confidence in RAG applications for real-world use. These notebooks contain an end-to-end RAG implementation + RAG evaluation part in Athina AI. ![evals diagram](https://github.com/user-attachments/assets/65c2b5af-a931-40c5-b006-87567aef019f) ## Advanced RAG Techniques⚙️ Here are the details of all the Advanced RAG techniques covered in this repository. | Technique | Tools | Description | Notebooks | |---------------------------------|------------------------------|--------------------------------------------------------------|-----------| | Naive RAG | LangChain, Pinecone, Athina AI | Combines retrieved data with LLMs for simple and effective responses.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/advanced_rag_techniques/naive_rag.ipynb) | | Hybrid RAG | LangChain, Chromadb, Athina AI | Combines vector search and traditional methods like BM25 for better information retrieval.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/advanced_rag_techniques/hybrid_rag.ipynb) | | Hyde RAG | LangChain, Weaviate, Athina AI | Creates hypothetical document embeddings to find relevant information for a query.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/advanced_rag_techniques/hyde_rag.ipynb) | | Parent Document Retriever | LangChain, Chromadb, Athina AI | Breaks large documents into small parts and retrieves the full document if a part matches the query.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/advanced_rag_techniques/parent_document_retriever.ipynb) | | RAG fusion | LangChain, LangSmith, Qdrant, Athina AI | Generates sub-queries, ranks documents with Reciprocal Rank Fusion, and uses top results for accurate responses.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/advanced_rag_techniques/fusion_rag.ipynb) | | Contextual RAG | LangChain, Chromadb, Athina AI | Compresses retrieved documents to keep only relevant details for concise and accurate responses.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/advanced_rag_techniques/contextual_rag.ipynb) | | Rewrite Retrieve Read | LangChain, Chromadb, Athina AI | Improves query, retrieves better data, and generates accurate answers.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/advanced_rag_techniques/rewrite_retrieve_read.ipynb) | | Unstructured RAG | LangChain, LangGraph, FAISS, Athina AI, Unstructured | This method designed to handle documents that combine text, tables, and images.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/advanced_rag_techniques/basic_unstructured_rag.ipynb) | ## Agentic RAG Techniques⚙️ Here are the details of all the Agentic RAG techniques covered in this repository. | Technique | Tools | Description | Notebooks | |---------------------------------|------------------------------|--------------------------------------------------------------|-----------| | Basic Agentic RAG | LangChain, FAISS, Athina AI | Agentic RAG uses AI agents to find and generate answers using tools like vectordb and web searches.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/agentic_rag_techniques/basic_agentic_rag.ipynb) | | Corrective RAG | LangChain, LangGraph, Chromadb, Athina AI | Refines relevant documents, removes irrelevant ones or does the web search.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/agentic_rag_techniques/corrective_rag.ipynb) | | Self RAG | LangChain, LangGraph, FAISS, Athina AI | Reflects on retrieved data to ensure accurate and complete responses.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/agentic_rag_techniques/self_rag.ipynb) | | Adaptive RAG | LangChain, LangGraph, FAISS, Athina AI | Adjusts retrieval methods based on query type, using indexed data or web search.| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/agentic_rag_techniques/adaptive_rag.ipynb) | | ReAct RAG | LangChain, LangGraph, FAISS, Athina AI | System combining reasoning and retrieval for context-aware responses| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/athina-ai/rag-cookbooks/blob/main/agentic_rag_techniques/react_rag.ipynb) | ## Demo🎬 A quick demo of how each notebook works: https://github.com/user-attachments/assets/c6f17961-40a1-4cca-ab1f-2c8fa3d71a7a ## Getting Started🛠️ First, clone this repository by using the following command: ```bash git clone https://github.com/athina-ai/rag-cookbooks.git ``` Next, navigate to the project directory: ```bash cd rag-cookbooks ``` Once you are in the 'rag-cookbooks' directory, follow the detailed implementation for each technique. ## Creators + Contributors👨🏻‍💻 [![Contributors](https://contrib.rocks/image?repo=athina-ai/cookbooks)](https://github.com/athina-ai/cookbooks/graphs/contributors) ## Contributing🤝 If you have a new technique or improvement to suggest, we welcome contributions from the community! ## License📝 This project is licensed under [MIT License](LICENSE)
{ "source": "athina-ai/rag-cookbooks", "title": "README.md", "url": "https://github.com/athina-ai/rag-cookbooks/blob/main/README.md", "date": "2024-11-27T06:50:35", "stars": 1715, "description": "This repository contains various advanced techniques for Retrieval-Augmented Generation (RAG) systems.", "file_size": 10861 }
# hertz-dev Hertz-dev is an open-source, first-of-its-kind base model for full-duplex conversational audio. See our blog post for more details: https://si.inc/hertz-dev/ ## Setup Inference is known to work on Python 3.10 and CUDA 12.1. Other versions have not been tested as thoroughly. If you want to use CUDA 12.1, you'll need to install torch with `pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121` before running `pip install -r requirements.txt`. On Ubuntu you may need to install libportaudio: `sudo apt-get install libportaudio2` All three scripts will automatically download the models to the `./ckpt` directory, and checkpoints are also accessible at https://ckpt.si.inc/hertz-dev/index.txt ## Usage We recommend starting by using `inference.ipynb` to generate one- or two-channel completions from a prompt. Then, you can use `inference_client.py` and `inference_server.py` to talk to the model live through your microphone. These are currently experimental, and have primarily been tested with Ubuntu on the server and MacOS on the client. Alternatively, you can use `inference_client_webrtc.py`, which is built on [streamlit](https://streamlit.io/) + [streamlit-webrtc](https://github.com/whitphx/streamlit-webrtc) and runs in a browser: ```bash # Install additional requirements pip install -r requirements_webrtc.txt # Run the client streamlit run inference_client_webrtc.py ``` Then, access the client at [http://localhost:8501](http://localhost:8501). **Note**: If you host the streamlit client anywhere other than `localhost` you will need to connect with https to avoid errors (see [here](https://github.com/whitphx/streamlit-webrtc?tab=readme-ov-file#serving-from-remote-host) for more info). An easy workaround is to `ssh` from the client into the server with port forwarding `ssh -L 127.0.0.1:8501:remote-host:8501 user@remote-host`, after which you can access the client at [http://localhost:8501](http://localhost:8501) as usual. If serving from a remote host with https, you may need to use a STUN server to establish the connection. You can do this by passing the `--use_ice_servers` flag: `streamlit run inference_client_webrtc.py -- --use_ice_servers`.
{ "source": "Standard-Intelligence/hertz-dev", "title": "README.md", "url": "https://github.com/Standard-Intelligence/hertz-dev/blob/main/README.md", "date": "2024-11-03T14:41:39", "stars": 1707, "description": "first base model for full-duplex conversational audio", "file_size": 2232 }
# Changelog Notable changes to this project will be documented in this file. ## [v0.2.0post1] - 2025-02-07 - Fix: Building Kokoro from source with adjustments, to avoid CUDA lock - Fixed ARM64 compatibility on Spacy dep to avoid emulation slowdown - Added g++ for Japanese language support - Temporarily disabled Vietnamese language support due to ARM64 compatibility issues ## [v0.2.0-pre] - 2025-02-06 ### Added - Complete Model Overhaul: - Upgraded to Kokoro v1.0 model architecture - Pre-installed multi-language support from Misaki: - English (en), Japanese (ja), Korean (ko),Chinese (zh), Vietnamese (vi) - All voice packs included for supported languages, along with the original versions. - Enhanced Audio Generation Features: - Per-word timestamped caption generation - Phoneme-based audio generation capabilities - Detailed phoneme generation - Web UI Improvements: - Improved voice mixing with weighted combinations - Text file upload support - Enhanced formatting and user interface - Cleaner UI (in progress) - Integration with https://github.com/hexgrad/kokoro and https://github.com/hexgrad/misaki packages ### Removed - Deprecated support for Kokoro v0.19 model ### Changes - Combine Voices endpoint now returns a .pt file, with generation combinations generated on the fly otherwise ## [v0.1.4] - 2025-01-30 ### Added - Smart Chunking System: - New text_processor with smart_split for improved sentence boundary detection - Dynamically adjusts chunk sizes based on sentence structure, using phoneme/token information in an intial pass - Should avoid ever going over the 510 limit per chunk, while preserving natural cadence - Web UI Added (To Be Replacing Gradio): - Integrated streaming with tempfile generation - Download links available in X-Download-Path header - Configurable cleanup triggers for temp files - Debug Endpoints: - /debug/threads for thread information and stack traces - /debug/storage for temp file and output directory monitoring - /debug/system for system resource information - /debug/session_pools for ONNX/CUDA session status - Automated Model Management: - Auto-download from releases page - Included download scripts for manual installation - Pre-packaged voice models in repository ### Changed - Significant architectural improvements: - Multi-model architecture support - Enhanced concurrency handling - Improved streaming header management - Better resource/session pool management ## [v0.1.2] - 2025-01-23 ### Structural Improvements - Models can be manually download and placed in api/src/models, or use included script - TTSGPU/TPSCPU/STTSService classes replaced with a ModelManager service - CPU/GPU of each of ONNX/PyTorch (Note: Only Pytorch GPU, and ONNX CPU/GPU have been tested) - Should be able to improve new models as they become available, or new architectures, in a more modular way - Converted a number of internal processes to async handling to improve concurrency - Improving separation of concerns towards plug-in and modular structure, making PR's and new features easier ### Web UI (test release) - An integrated simple web UI has been added on the FastAPI server directly - This can be disabled via core/config.py or ENV variables if desired. - Simplifies deployments, utility testing, aesthetics, etc - Looking to deprecate/collaborate/hand off the Gradio UI ## [v0.1.0] - 2025-01-13 ### Changed - Major Docker improvements: - Baked model directly into Dockerfile for improved deployment reliability - Switched to uv for dependency management - Streamlined container builds and reduced image sizes - Dependency Management: - Migrated from pip/poetry to uv for faster, more reliable package management - Added uv.lock for deterministic builds - Updated dependency resolution strategy ## [v0.0.5post1] - 2025-01-11 ### Fixed - Docker image tagging and versioning improvements (-gpu, -cpu, -ui) - Minor vram management improvements - Gradio bugfix causing crashes and errant warnings - Updated GPU and UI container configurations ## [v0.0.5] - 2025-01-10 ### Fixed - Stabilized issues with images tagging and structures from v0.0.4 - Added automatic master to develop branch synchronization - Improved release tagging and structures - Initial CI/CD setup ## 2025-01-04 ### Added - ONNX Support: - Added single batch ONNX support for CPU inference - Roughly 0.4 RTF (2.4x real-time speed) ### Modified - Code Refactoring: - Work on modularizing phonemizer and tokenizer into separate services - Incorporated these services into a dev endpoint - Testing and Benchmarking: - Cleaned up benchmarking scripts - Cleaned up test scripts - Added auto-WAV validation scripts ## 2025-01-02 - Audio Format Support: - Added comprehensive audio format conversion support (mp3, wav, opus, flac) ## 2025-01-01 ### Added - Gradio Web Interface: - Added simple web UI utility for audio generation from input or txt file ### Modified #### Configuration Changes - Updated Docker configurations: - Changes to `Dockerfile`: - Improved layer caching by separating dependency and code layers - Updates to `docker-compose.yml` and `docker-compose.cpu.yml`: - Removed commit lock from model fetching to allow automatic model updates from HF - Added git index lock cleanup #### API Changes - Modified `api/src/main.py` - Updated TTS service implementation in `api/src/services/tts.py`: - Added device management for better resource control: - Voices are now copied from model repository to api/src/voices directory for persistence - Refactored voice pack handling: - Removed static voice pack dictionary - On-demand voice loading from disk - Added model warm-up functionality: - Model now initializes with a dummy text generation - Uses default voice (af.pt) for warm-up - Model is ready for inference on first request
{ "source": "remsky/Kokoro-FastAPI", "title": "CHANGELOG.md", "url": "https://github.com/remsky/Kokoro-FastAPI/blob/master/CHANGELOG.md", "date": "2024-12-30T11:53:42", "stars": 1687, "description": "Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/CPU ONNX and NVIDIA GPU PyTorch support, handling, and auto-stitching", "file_size": 5931 }
<p align="center"> <img src="githubbanner.png" alt="Kokoro TTS Banner"> </p> # <sub><sub>_`FastKoko`_ </sub></sub> [![Tests](https://img.shields.io/badge/tests-69%20passed-darkgreen)]() [![Coverage](https://img.shields.io/badge/coverage-52%25-tan)]() [![Try on Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Try%20on-Spaces-blue)](https://huggingface.co/spaces/Remsky/Kokoro-TTS-Zero) [![Kokoro](https://img.shields.io/badge/kokoro-v0.7.9::31a2b63-BB5420)](https://github.com/hexgrad/kokoro) [![Misaki](https://img.shields.io/badge/misaki-v0.7.9::ebc76c2-B8860B)](https://github.com/hexgrad/misaki) [![Tested at Model Commit](https://img.shields.io/badge/last--tested--model--commit-1.0::9901c2b-blue)](https://huggingface.co/hexgrad/Kokoro-82M/commit/9901c2b79161b6e898b7ea857ae5298f47b8b0d6) Dockerized FastAPI wrapper for [Kokoro-82M](https://huggingface.co/hexgrad/Kokoro-82M) text-to-speech model - Multi-language support (English, Japanese, Korean, Chinese, _Vietnamese soon_) - OpenAI-compatible Speech endpoint, NVIDIA GPU accelerated or CPU inference with PyTorch - ONNX support coming soon, see v0.1.5 and earlier for legacy ONNX support in the interim - Debug endpoints for monitoring system stats, integrated web UI on localhost:8880/web - Phoneme-based audio generation, phoneme generation - Per-word timestamped caption generation - Voice mixing with weighted combinations ### Integration Guides [![Helm Chart](https://img.shields.io/badge/Helm%20Chart-black?style=flat&logo=helm&logoColor=white)](https://github.com/remsky/Kokoro-FastAPI/wiki/Setup-Kubernetes) [![DigitalOcean](https://img.shields.io/badge/DigitalOcean-black?style=flat&logo=digitalocean&logoColor=white)](https://github.com/remsky/Kokoro-FastAPI/wiki/Integrations-DigitalOcean) [![SillyTavern](https://img.shields.io/badge/SillyTavern-black?style=flat&color=red)](https://github.com/remsky/Kokoro-FastAPI/wiki/Integrations-SillyTavern) [![OpenWebUI](https://img.shields.io/badge/OpenWebUI-black?style=flat&color=white)](https://github.com/remsky/Kokoro-FastAPI/wiki/Integrations-OpenWebUi) ## Get Started <details> <summary>Quickest Start (docker run)</summary> Pre built images are available to run, with arm/multi-arch support, and baked in models Refer to the core/config.py file for a full list of variables which can be managed via the environment ```bash # the `latest` tag can be used, but should not be considered stable as it may include `nightly` branch builds # it may have some bonus features however, and feedback/testing is welcome docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:v0.2.2 # CPU, or: docker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2 #NVIDIA GPU ``` </details> <details> <summary>Quick Start (docker compose) </summary> 1. Install prerequisites, and start the service using Docker Compose (Full setup including UI): - Install [Docker](https://www.docker.com/products/docker-desktop/) - Clone the repository: ```bash git clone https://github.com/remsky/Kokoro-FastAPI.git cd Kokoro-FastAPI cd docker/gpu # For GPU support # or cd docker/cpu # For CPU support docker compose up --build # Models will auto-download, but if needed you can manually download: python docker/scripts/download_model.py --output api/src/models/v1_0 # Or run directly via UV: ./start-gpu.sh # For GPU support ./start-cpu.sh # For CPU support ``` </details> <details> <summary>Direct Run (via uv) </summary> 1. Install prerequisites (): - Install [astral-uv](https://docs.astral.sh/uv/) - Install [espeak-ng](https://github.com/espeak-ng/espeak-ng) in your system if you want it available as a fallback for unknown words/sounds. The upstream libraries may attempt to handle this, but results have varied. - Clone the repository: ```bash git clone https://github.com/remsky/Kokoro-FastAPI.git cd Kokoro-FastAPI ``` Run the [model download script](https://github.com/remsky/Kokoro-FastAPI/blob/master/docker/scripts/download_model.py) if you haven't already Start directly via UV (with hot-reload) ```bash ./start-cpu.sh OR ./start-gpu.sh ``` </details> <details open> <summary> Up and Running? </summary> Run locally as an OpenAI-Compatible Speech Endpoint ```python from openai import OpenAI client = OpenAI( base_url="http://localhost:8880/v1", api_key="not-needed" ) with client.audio.speech.with_streaming_response.create( model="kokoro", voice="af_sky+af_bella", #single or multiple voicepack combo input="Hello world!" ) as response: response.stream_to_file("output.mp3") ``` - The API will be available at http://localhost:8880 - API Documentation: http://localhost:8880/docs - Web Interface: http://localhost:8880/web <div align="center" style="display: flex; justify-content: center; gap: 10px;"> <img src="assets/docs-screenshot.png" width="42%" alt="API Documentation" style="border: 2px solid #333; padding: 10px;"> <img src="assets/webui-screenshot.png" width="42%" alt="Web UI Screenshot" style="border: 2px solid #333; padding: 10px;"> </div> </details> ## Features <details> <summary>OpenAI-Compatible Speech Endpoint</summary> ```python # Using OpenAI's Python library from openai import OpenAI client = OpenAI(base_url="http://localhost:8880/v1", api_key="not-needed") response = client.audio.speech.create( model="kokoro", voice="af_bella+af_sky", # see /api/src/core/openai_mappings.json to customize input="Hello world!", response_format="mp3" ) response.stream_to_file("output.mp3") ``` Or Via Requests: ```python import requests response = requests.get("http://localhost:8880/v1/audio/voices") voices = response.json()["voices"] # Generate audio response = requests.post( "http://localhost:8880/v1/audio/speech", json={ "model": "kokoro", "input": "Hello world!", "voice": "af_bella", "response_format": "mp3", # Supported: mp3, wav, opus, flac "speed": 1.0 } ) # Save audio with open("output.mp3", "wb") as f: f.write(response.content) ``` Quick tests (run from another terminal): ```bash python examples/assorted_checks/test_openai/test_openai_tts.py # Test OpenAI Compatibility python examples/assorted_checks/test_voices/test_all_voices.py # Test all available voices ``` </details> <details> <summary>Voice Combination</summary> - Weighted voice combinations using ratios (e.g., "af_bella(2)+af_heart(1)" for 67%/33% mix) - Ratios are automatically normalized to sum to 100% - Available through any endpoint by adding weights in parentheses - Saves generated voicepacks for future use Combine voices and generate audio: ```python import requests response = requests.get("http://localhost:8880/v1/audio/voices") voices = response.json()["voices"] # Example 1: Simple voice combination (50%/50% mix) response = requests.post( "http://localhost:8880/v1/audio/speech", json={ "input": "Hello world!", "voice": "af_bella+af_sky", # Equal weights "response_format": "mp3" } ) # Example 2: Weighted voice combination (67%/33% mix) response = requests.post( "http://localhost:8880/v1/audio/speech", json={ "input": "Hello world!", "voice": "af_bella(2)+af_sky(1)", # 2:1 ratio = 67%/33% "response_format": "mp3" } ) # Example 3: Download combined voice as .pt file response = requests.post( "http://localhost:8880/v1/audio/voices/combine", json="af_bella(2)+af_sky(1)" # 2:1 ratio = 67%/33% ) # Save the .pt file with open("combined_voice.pt", "wb") as f: f.write(response.content) # Use the downloaded voice file response = requests.post( "http://localhost:8880/v1/audio/speech", json={ "input": "Hello world!", "voice": "combined_voice", # Use the saved voice file "response_format": "mp3" } ) ``` <p align="center"> <img src="assets/voice_analysis.png" width="80%" alt="Voice Analysis Comparison" style="border: 2px solid #333; padding: 10px;"> </p> </details> <details> <summary>Multiple Output Audio Formats</summary> - mp3 - wav - opus - flac - m4a - pcm <p align="center"> <img src="assets/format_comparison.png" width="80%" alt="Audio Format Comparison" style="border: 2px solid #333; padding: 10px;"> </p> </details> <details> <summary>Streaming Support</summary> ```python # OpenAI-compatible streaming from openai import OpenAI client = OpenAI( base_url="http://localhost:8880/v1", api_key="not-needed") # Stream to file with client.audio.speech.with_streaming_response.create( model="kokoro", voice="af_bella", input="Hello world!" ) as response: response.stream_to_file("output.mp3") # Stream to speakers (requires PyAudio) import pyaudio player = pyaudio.PyAudio().open( format=pyaudio.paInt16, channels=1, rate=24000, output=True ) with client.audio.speech.with_streaming_response.create( model="kokoro", voice="af_bella", response_format="pcm", input="Hello world!" ) as response: for chunk in response.iter_bytes(chunk_size=1024): player.write(chunk) ``` Or via requests: ```python import requests response = requests.post( "http://localhost:8880/v1/audio/speech", json={ "input": "Hello world!", "voice": "af_bella", "response_format": "pcm" }, stream=True ) for chunk in response.iter_content(chunk_size=1024): if chunk: # Process streaming chunks pass ``` <p align="center"> <img src="assets/gpu_first_token_timeline_openai.png" width="45%" alt="GPU First Token Timeline" style="border: 2px solid #333; padding: 10px; margin-right: 1%;"> <img src="assets/cpu_first_token_timeline_stream_openai.png" width="45%" alt="CPU First Token Timeline" style="border: 2px solid #333; padding: 10px;"> </p> Key Streaming Metrics: - First token latency @ chunksize - ~300ms (GPU) @ 400 - ~3500ms (CPU) @ 200 (older i7) - ~<1s (CPU) @ 200 (M3 Pro) - Adjustable chunking settings for real-time playback *Note: Artifacts in intonation can increase with smaller chunks* </details> ## Processing Details <details> <summary>Performance Benchmarks</summary> Benchmarking was performed on generation via the local API using text lengths up to feature-length books (~1.5 hours output), measuring processing time and realtime factor. Tests were run on: - Windows 11 Home w/ WSL2 - NVIDIA 4060Ti 16gb GPU @ CUDA 12.1 - 11th Gen i7-11700 @ 2.5GHz - 64gb RAM - WAV native output - H.G. Wells - The Time Machine (full text) <p align="center"> <img src="assets/gpu_processing_time.png" width="45%" alt="Processing Time" style="border: 2px solid #333; padding: 10px; margin-right: 1%;"> <img src="assets/gpu_realtime_factor.png" width="45%" alt="Realtime Factor" style="border: 2px solid #333; padding: 10px;"> </p> Key Performance Metrics: - Realtime Speed: Ranges between 35x-100x (generation time to output audio length) - Average Processing Rate: 137.67 tokens/second (cl100k_base) </details> <details> <summary>GPU Vs. CPU</summary> ```bash # GPU: Requires NVIDIA GPU with CUDA 12.8 support (~35x-100x realtime speed) cd docker/gpu docker compose up --build # CPU: PyTorch CPU inference cd docker/cpu docker compose up --build ``` *Note: Overall speed may have reduced somewhat with the structural changes to accommodate streaming. Looking into it* </details> <details> <summary>Natural Boundary Detection</summary> - Automatically splits and stitches at sentence boundaries - Helps to reduce artifacts and allow long form processing as the base model is only currently configured for approximately 30s output The model is capable of processing up to a 510 phonemized token chunk at a time, however, this can often lead to 'rushed' speech or other artifacts. An additional layer of chunking is applied in the server, that creates flexible chunks with a `TARGET_MIN_TOKENS` , `TARGET_MAX_TOKENS`, and `ABSOLUTE_MAX_TOKENS` which are configurable via environment variables, and set to 175, 250, 450 by default </details> <details> <summary>Timestamped Captions & Phonemes</summary> Generate audio with word-level timestamps without streaming: ```python import requests import base64 import json response = requests.post( "http://localhost:8880/dev/captioned_speech", json={ "model": "kokoro", "input": "Hello world!", "voice": "af_bella", "speed": 1.0, "response_format": "mp3", "stream": False, }, stream=False ) with open("output.mp3","wb") as f: audio_json=json.loads(response.content) # Decode base 64 stream to bytes chunk_audio=base64.b64decode(audio_json["audio"].encode("utf-8")) # Process streaming chunks f.write(chunk_audio) # Print word level timestamps print(audio_json["timestamps"]) ``` Generate audio with word-level timestamps with streaming: ```python import requests import base64 import json response = requests.post( "http://localhost:8880/dev/captioned_speech", json={ "model": "kokoro", "input": "Hello world!", "voice": "af_bella", "speed": 1.0, "response_format": "mp3", "stream": True, }, stream=True ) f=open("output.mp3","wb") for chunk in response.iter_lines(decode_unicode=True): if chunk: chunk_json=json.loads(chunk) # Decode base 64 stream to bytes chunk_audio=base64.b64decode(chunk_json["audio"].encode("utf-8")) # Process streaming chunks f.write(chunk_audio) # Print word level timestamps print(chunk_json["timestamps"]) ``` </details> <details> <summary>Phoneme & Token Routes</summary> Convert text to phonemes and/or generate audio directly from phonemes: ```python import requests def get_phonemes(text: str, language: str = "a"): """Get phonemes and tokens for input text""" response = requests.post( "http://localhost:8880/dev/phonemize", json={"text": text, "language": language} # "a" for American English ) response.raise_for_status() result = response.json() return result["phonemes"], result["tokens"] def generate_audio_from_phonemes(phonemes: str, voice: str = "af_bella"): """Generate audio from phonemes""" response = requests.post( "http://localhost:8880/dev/generate_from_phonemes", json={"phonemes": phonemes, "voice": voice}, headers={"Accept": "audio/wav"} ) if response.status_code != 200: print(f"Error: {response.text}") return None return response.content # Example usage text = "Hello world!" try: # Convert text to phonemes phonemes, tokens = get_phonemes(text) print(f"Phonemes: {phonemes}") # e.g. ðɪs ɪz ˈoʊnli ɐ tˈɛst print(f"Tokens: {tokens}") # Token IDs including start/end tokens # Generate and save audio if audio_bytes := generate_audio_from_phonemes(phonemes): with open("speech.wav", "wb") as f: f.write(audio_bytes) print(f"Generated {len(audio_bytes)} bytes of audio") except Exception as e: print(f"Error: {e}") ``` See `examples/phoneme_examples/generate_phonemes.py` for a sample script. </details> <details> <summary>Debug Endpoints</summary> Monitor system state and resource usage with these endpoints: - `/debug/threads` - Get thread information and stack traces - `/debug/storage` - Monitor temp file and output directory usage - `/debug/system` - Get system information (CPU, memory, GPU) - `/debug/session_pools` - View ONNX session and CUDA stream status Useful for debugging resource exhaustion or performance issues. </details> ## Known Issues <details> <summary>Versioning & Development</summary> I'm doing what I can to keep things stable, but we are on an early and rapid set of build cycles here. If you run into trouble, you may have to roll back a version on the release tags if something comes up, or build up from source and/or troubleshoot + submit a PR. Will leave the branch up here for the last known stable points: `v0.1.4` `v0.0.5post1` Free and open source is a community effort, and I love working on this project, though there's only really so many hours in a day. If you'd like to support the work, feel free to open a PR, buy me a coffee, or report any bugs/features/etc you find during use. <a href="https://www.buymeacoffee.com/remsky" target="_blank"> <img src="https://cdn.buymeacoffee.com/buttons/v2/default-violet.png" alt="Buy Me A Coffee" style="height: 30px !important;width: 110px !important;" > </a> </details> <details> <summary>Linux GPU Permissions</summary> Some Linux users may encounter GPU permission issues when running as non-root. Can't guarantee anything, but here are some common solutions, consider your security requirements carefully ### Option 1: Container Groups (Likely the best option) ```yaml services: kokoro-tts: # ... existing config ... group_add: - "video" - "render" ``` ### Option 2: Host System Groups ```yaml services: kokoro-tts: # ... existing config ... user: "${UID}:${GID}" group_add: - "video" ``` Note: May require adding host user to groups: `sudo usermod -aG docker,video $USER` and system restart. ### Option 3: Device Permissions (Use with caution) ```yaml services: kokoro-tts: # ... existing config ... devices: - /dev/nvidia0:/dev/nvidia0 - /dev/nvidiactl:/dev/nvidiactl - /dev/nvidia-uvm:/dev/nvidia-uvm ``` ⚠️ Warning: Reduces system security. Use only in development environments. Prerequisites: NVIDIA GPU, drivers, and container toolkit must be properly configured. Visit [NVIDIA Container Toolkit installation](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) for more detailed information </details> ## Model and License <details open> <summary>Model</summary> This API uses the [Kokoro-82M](https://huggingface.co/hexgrad/Kokoro-82M) model from HuggingFace. Visit the model page for more details about training, architecture, and capabilities. I have no affiliation with any of their work, and produced this wrapper for ease of use and personal projects. </details> <details> <summary>License</summary> This project is licensed under the Apache License 2.0 - see below for details: - The Kokoro model weights are licensed under Apache 2.0 (see [model page](https://huggingface.co/hexgrad/Kokoro-82M)) - The FastAPI wrapper code in this repository is licensed under Apache 2.0 to match - The inference code adapted from StyleTTS2 is MIT licensed The full Apache 2.0 license text can be found at: https://www.apache.org/licenses/LICENSE-2.0 </details>
{ "source": "remsky/Kokoro-FastAPI", "title": "README.md", "url": "https://github.com/remsky/Kokoro-FastAPI/blob/master/README.md", "date": "2024-12-30T11:53:42", "stars": 1687, "description": "Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/CPU ONNX and NVIDIA GPU PyTorch support, handling, and auto-stitching", "file_size": 18960 }
--- name: Bug report about: Create a report to help us improve title: '' labels: '' assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **Screenshots or console output** If applicable, add screenshots to help explain your problem. When doing so., please ensure you have the first command that triggered the trace and/or the command that started up your build included, otherwise it is difficult to diagnose. **Branch / Deployment used** Let us know if it's the master branch, or the stable branch indicated in the readme, as well as if you're running it locally, in the cloud, via the docker compose (cpu or gpu), or direct docker run commands. Please include the exact commands used to run in the latter cases. **Operating System** Include the platform, version numbers of your docker, etc. Whether its GPU (Nvidia or other) or CPU, Mac, Linux, Windows, etc. **Additional context** Add any other context about the problem here.
{ "source": "remsky/Kokoro-FastAPI", "title": ".github/ISSUE_TEMPLATE/bug_report.md", "url": "https://github.com/remsky/Kokoro-FastAPI/blob/master/.github/ISSUE_TEMPLATE/bug_report.md", "date": "2024-12-30T11:53:42", "stars": 1687, "description": "Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/CPU ONNX and NVIDIA GPU PyTorch support, handling, and auto-stitching", "file_size": 975 }
--- name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' --- **Describe the feature you'd like** A clear and concise description of what you want to happen. Is it a quality of life improvement, something new entirely? **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. Consider whether it could be submitted as PR, or you'd need a hand to do so **Additional context** Add any other context or screenshots about the feature request here.
{ "source": "remsky/Kokoro-FastAPI", "title": ".github/ISSUE_TEMPLATE/feature_request.md", "url": "https://github.com/remsky/Kokoro-FastAPI/blob/master/.github/ISSUE_TEMPLATE/feature_request.md", "date": "2024-12-30T11:53:42", "stars": 1687, "description": "Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/CPU ONNX and NVIDIA GPU PyTorch support, handling, and auto-stitching", "file_size": 570 }
# ESpeak-NG Setup Fix ## Issue Description Users are reporting two distinct errors: 1. Missing espeak-ng-data/phontab file: ``` Error processing file '/home/runner/work/espeakng-loader/espeakng-loader/espeak-ng/_dynamic/share/espeak-ng-data/phontab': No such file or directory. ``` 2. Invalid pipeline state: ``` Error generating speech: The object is in an invalid state. ``` ## Root Cause Analysis ### 1. ESpeak-NG Data Issue The dependency chain has changed: ``` Before: kokoro-fastapi (phonemizer 3.3.0) -> kokoro -> misaki -> phonemizer After: kokoro-fastapi -> kokoro -> misaki -> phonemizer-fork + espeakng-loader ``` The issue arises because: 1. misaki now uses espeakng-loader to manage espeak paths 2. espeakng-loader looks for data in its package directory 3. We have a direct dependency on phonemizer 3.3.0 that conflicts ### 2. Pipeline State Issue The "invalid state" error occurs due to device mismatch in pipeline creation. ## Solution ### 1. For ESpeak-NG Data Update dependencies and environment: 1. Remove direct phonemizer dependency: ```diff - "phonemizer==3.3.0", # Remove this ``` 2. Let misaki handle phonemizer-fork and espeakng-loader 3. Set environment variable in Dockerfile: ```dockerfile ENV PHONEMIZER_ESPEAK_PATH=/usr/bin \ PHONEMIZER_ESPEAK_DATA=/usr/share/espeak-ng-data \ ESPEAK_DATA_PATH=/usr/share/espeak-ng-data # Add this ``` This approach: - Works with misaki's new dependencies - Maintains our working espeak setup - Avoids complex file copying or path manipulation ### 2. For Pipeline State Use kokoro_v1's pipeline management: ```python # Instead of creating pipelines directly: # pipeline = KPipeline(...) # Use backend's pipeline management: pipeline = backend._get_pipeline(pipeline_lang_code) ``` ## Implementation Steps 1. Update pyproject.toml: - Remove direct phonemizer dependency - Keep misaki dependency as is 2. Update Dockerfiles: - Add ESPEAK_DATA_PATH environment variable - Keep existing espeak-ng setup 3. Update tts_service.py: - Use backend's pipeline management - Add proper error handling ## Testing 1. Test espeak-ng functionality: ```bash # Verify environment variables echo $ESPEAK_DATA_PATH echo $PHONEMIZER_ESPEAK_DATA # Check data directory ls /usr/share/espeak-ng-data ``` 2. Test pipeline state: - Test on both CPU and GPU - Verify no invalid state errors - Test with different voice models ## Success Criteria 1. No espeak-ng-data/phontab file errors 2. No invalid state errors 3. Consistent behavior across platforms 4. Successful CI/CD pipeline runs ## Future Considerations 1. Potential PR to misaki: - Add fallback mechanism if espeakng-loader fails - Make path configuration more flexible - Add better error messages 2. Environment Variable Documentation: - Document ESPEAK_DATA_PATH requirement - Explain interaction with espeakng-loader - Provide platform-specific setup instructions ## Notes - This solution works with misaki's new dependencies while maintaining our setup - Environment variable approach is simpler than file copying - May want to contribute improvements back to misaki later
{ "source": "remsky/Kokoro-FastAPI", "title": "docs/architecture/espeak_setup_fix.md", "url": "https://github.com/remsky/Kokoro-FastAPI/blob/master/docs/architecture/espeak_setup_fix.md", "date": "2024-12-30T11:53:42", "stars": 1687, "description": "Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/CPU ONNX and NVIDIA GPU PyTorch support, handling, and auto-stitching", "file_size": 3186 }
# Streaming Audio Writer Analysis This auto-document provides an in-depth technical analysis of the `StreamingAudioWriter` class, detailing the streaming and non-streaming paths, supported formats, header management, and challenges faced in the implementation. ## Overview The `StreamingAudioWriter` class is designed to handle streaming audio format conversions efficiently. It supports various audio formats and provides methods to write audio data in chunks, finalize the stream, and manage audio headers meticulously to ensure compatibility and integrity of the resulting audio files. ## Supported Formats The class supports the following audio formats: - **WAV** - **OGG** - **Opus** - **FLAC** - **MP3** - **AAC** - **PCM** ## Initialization Upon initialization, the class sets up format-specific configurations to prepare for audio data processing: - **WAV**: - Writes an initial WAV header with placeholders for file size (`RIFF` chunk) and data size (`data` chunk). - Utilizes the `_write_wav_header` method to generate the header. - **OGG/Opus/FLAC**: - Uses `soundfile.SoundFile` to write audio data to a memory buffer (`BytesIO`). - Configures the writer with appropriate format and subtype based on the specified format. - **MP3/AAC**: - Utilizes `pydub.AudioSegment` for incremental writing. - Initializes an empty `AudioSegment` as the encoder to accumulate audio data. - **PCM**: - Prepares to write raw PCM bytes without additional headers. Initialization ensures that each format is correctly configured to handle the specific requirements of streaming and finalizing audio data. ## Streaming Path ### Writing Chunks The `write_chunk` method handles the incoming audio data, processing it according to the specified format: - **WAV**: - **First Chunk**: Writes the initial WAV header to the buffer. - **Subsequent Chunks**: Writes raw PCM data directly after the header. - Updates `bytes_written` to track the total size of audio data written. - **OGG/Opus/FLAC**: - Writes audio data to the `soundfile` buffer. - Flushes the writer to ensure data integrity. - Retrieves the current buffer contents and truncates the buffer for the next chunk. - **MP3/AAC**: - Converts incoming audio data (`np.ndarray`) to a `pydub.AudioSegment`. - Accumulates segments in the encoder. - Exports the current state to the output buffer without writing duration metadata or XING headers for chunks. - Resets the encoder to prevent memory growth after exporting. - **PCM**: - Directly writes raw bytes from the audio data to the output buffer. ### Finalizing Finalizing the audio stream involves ensuring that all audio data is correctly written and that headers are updated to reflect the accurate file and data sizes: - **WAV**: - Rewrites the `RIFF` and `data` chunks in the header with the actual file size (`bytes_written + 36`) and data size (`bytes_written`). - Creates a new buffer with the complete WAV file by copying audio data from the original buffer starting at byte 44 (end of the initial header). - **OGG/Opus/FLAC**: - Closes the `soundfile` writer to flush all remaining data to the buffer. - Returns the final buffer content, ensuring that all necessary headers and data are correctly written. - **MP3/AAC**: - Exports any remaining audio data with proper headers and metadata, including duration and VBR quality for MP3. - Writes ID3v1 and ID3v2 tags for MP3 formats. - Performs final exports to ensure that all audio data is properly encoded and formatted. - **PCM**: - No finalization is needed as PCM involves raw data without headers. ## Non-Streaming Path The `StreamingAudioWriter` class is inherently designed for streaming audio data. However, it's essential to understand how it behaves when handling complete files versus streaming data: ### Full File Writing - **Process**: - Accumulate all audio data in memory or buffer. - Write the complete file with accurate headers and data sizes upon finalization. - **Advantages**: - Simplifies header management since the total data size is known before writing. - Reduces complexity in data handling and processing. - **Disadvantages**: - High memory consumption for large audio files. - Delay in availability of audio data until the entire file is processed. ### Stream-to-File Writing - **Process**: - Incrementally write audio data in chunks. - Update headers and finalize the file dynamically as data flows. - **Advantages**: - Lower memory usage as data is processed in smaller chunks. - Immediate availability of audio data, suitable for real-time streaming applications. - **Disadvantages**: - Complex header management to accommodate dynamic data sizes. - Increased likelihood of header synchronization issues, leading to potential file corruption. **Challenges**: - Balancing memory usage with processing speed. - Ensuring consistent and accurate header updates during streaming operations. ## Header Management ### WAV Headers WAV files utilize `RIFF` headers to describe file structure: - **Initial Header**: - Contains placeholders for file size and data size (`struct.pack('<L', 0)`). - **Final Header**: - Calculates and writes the actual file size (`bytes_written + 36`) and data size (`bytes_written`). - Ensures that audio players can correctly interpret the file by having accurate header information. **Technical Details**: - The `_write_wav_header` method initializes the WAV header with placeholders. - Upon finalization, the `write_chunk` method creates a new buffer, writes the correct sizes, and appends the audio data from the original buffer starting at byte 44 (end of the initial header). **Challenges**: - Maintaining synchronization between audio data size and header placeholders. - Ensuring that the header is correctly rewritten upon finalization to prevent file corruption. ### MP3/AAC Headers MP3 and AAC formats require proper metadata and headers to ensure compatibility: - **XING Headers (MP3)**: - Essential for Variable Bit Rate (VBR) audio files. - Control the quality and indexing of the MP3 file. - **ID3 Tags (MP3)**: - Provide metadata such as artist, title, and album information. - **ADTS Headers (AAC)**: - Describe the AAC frame headers necessary for decoding. **Technical Details**: - During finalization, the `write_chunk` method for MP3/AAC formats includes: - Duration metadata (`-metadata duration`). - VBR headers for MP3 (`-write_vbr`, `-vbr_quality`). - ID3 tags for MP3 (`-write_id3v1`, `-write_id3v2`). - Ensures that all remaining audio data is correctly encoded and formatted with the necessary headers. **Challenges**: - Ensuring that metadata is accurately written during the finalization process. - Managing VBR headers to maintain audio quality and file integrity.
{ "source": "remsky/Kokoro-FastAPI", "title": "docs/architecture/streaming_audio_writer_analysis.md", "url": "https://github.com/remsky/Kokoro-FastAPI/blob/master/docs/architecture/streaming_audio_writer_analysis.md", "date": "2024-12-30T11:53:42", "stars": 1687, "description": "Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/CPU ONNX and NVIDIA GPU PyTorch support, handling, and auto-stitching", "file_size": 6882 }
# Contributing First of all, __thank you__ for your interest in contributing to AgentStack! Even the smallest contributions help a _ton_. Our vision is to build the defacto CLI for quickly spinning up an AI Agent project. We want to be the [create-react-app](https://create-react-app.dev/) of agents. Our inspiration also includes the oh-so-convenient [Angular CLI](https://v17.angular.io/cli). ### Exclusive Contributor Sticker AgentStack contributors all receive a free sticker pack including an exclusive holographic sticker only available to contributors to the project :) Once your PR is merge, fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLSfvBEnsT8nsQleonJHoWQtHuhbsgUJ0a9IjOqeZbMGkga2NtA/viewform?usp=sf_link) and I'll send your sticker pack out ASAP! <3 ## How to Help Grab an issue from the [issues tab](https://github.com/AgentOps-AI/AgentStack/issues)! Plenty are labelled "Good First Issue". Fork the repo and create a PR when ready! The best place to engage in conversation about your contribution is in the Issue chat or on our [Discord](https://discord.gg/JdWkh9tgTQ). ## Setup 1. Clone the repo `git clone https://github.com/AgentOps-AI/AgentStack.git` `cd AgentStack` 2. Install agentstack as an edtiable project and set it up for development and testing `pip install -e .[dev,test]` This will install the CLI locally and in editable mode so you can use `agentstack <command>` to test your latest changes ## Adding Tools If you're reading this section, you probably have a product that AI agents can use as a tool. We're glad you're here! Adding tools is easy once you understand the project structure. Our documentation for adding tools is available on our hosted docs [here](https://docs.agentstack.sh/contributing/adding-tools). ## Before creating your PR Be sure that you are opening a PR using a branch other than `main` on your fork. This enables us to pull your branch and make modifications to the PR with your permission that may be helpful. ### Formatting AgentStack uses Ruff formatter for consistent code formatting. To format your code, run: ```bash pip install ruff ruff format . ``` ### Type Checking AgentStack uses MyPy for type checking. To check types, run: ```bash mypy agentstack ``` ### Pre-Commit Hooks Ruff and MyPy can be run as pre-commit hooks. To enable these hooks, run: ```bash pre-commit install ``` ## Tests CLI tests are a bit hacky, so we are not tracking coverage. That said, _some_ testing is required for any new functionality added by a PR. Tests MUST pass to have your PR merged. We _will not_ allow main to be in a failing state, so if your tests are failing, this is your problem to fix. ### Run tests locally Install the testing requirements ```bash pip install 'agentstack[test]' ``` Then run tests in all supported python versions with ```bash tox ``` ## Need Help? If you're reading this, we're very thankful you wanted to contribute! I understand it can be a little overwhelming to get up to speed on a project like this and we are here to help! ### Open a draft PR While we can't promise to write code for you, if you're stuck or need advice/help, open a draft PR and explain what you were trying to build and where you're stuck! Chances are, one of us have the context needed to help you get unstuck :) ### Chat on our Discord We have an active [Discord server](https://discord.gg/JdWkh9tgTQ) with contributors and AgentStack users! There is a channel just for contributors on there. Feel free to drop a message explaining what you're trying to build and why you're stuck. Someone from our team should reply soon! # Thank You! The team behind AgentStack believe that the barrier to entry for building agents is far too high right now! We believe that this technology can be streamlined and made more accessible. If you're here, you likely feel the same! Any contribution is appreciated. If you're looking for work, we are _always_ open to hiring passionate engineers of all skill levels! While closing issues cannot guarantee an offer, we've found that engineers who contribute to our open source repo are some of the best we could ever hope to find via recruiters! Be active in the community and let us know you're interested in joining the team!
{ "source": "AgentOps-AI/AgentStack", "title": "CONTRIBUTING.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/CONTRIBUTING.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 4267 }
# AgentStack [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/release/python-3100/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ![python-testing](https://github.com/agentops-ai/agentstack/actions/workflows/python-testing.yml/badge.svg) ![mypy](https://github.com/agentops-ai/agentstack/actions/workflows/mypy.yml/badge.svg) [![codecov.io](https://codecov.io/github/agentops-ai/agentstack/coverage.svg?branch=master)](https://codecov.io/github/agentops-ai/agentstack>?branch=master) AgentStack scaffolds your _agent stack_ - The tech stack that collectively is your agent <p align='center'> <img src='./docs/images/the_agent_stack.png' width='600' alt='AgentStack items'> </p> ### Install AgentStack ```sh curl --proto '=https' --tlsv1.2 -LsSf https://install.agentstack.sh | sh ``` or python [other install methods](https://docs.agentstack.sh/installation) ### Start your agent! Create AI agent projects from the command line. - [Quickstart Guide](https://docs.agentstack.sh/quickstart) – How to create a new agent project. - [Video Tutorial](https://www.loom.com/share/68d796b13cd94647bd1d7fae12b2358e?sid=7fdf595b-de84-4d51-9a81-ef1e9c8ac71c) – Follow along and build a web scrape agent with AgentStack AgentStack works on macOS, Windows, and Linux.<br> If something doesn't work, please [file an issue](https://github.com/agentops-ai/agentstack/issues/new).<br> If you have questions or need help, please ask in our [Discord community](https://discord.gg/JdWkh9tgTQ). > 🛠️🏃🏼‍♀️ The quickest way to build your powerful agent project AgentStack serves as a great tool for starting your agent project and offers many CLI utilities for easy code-gen throughout the development process. AgentStack is _not_ a low-code alternative to development. Developers will still need an understanding of how to build with their selected agent framework. ### Currently Supported Providers - **LLMs**: Most all notable LLMs and providers are supported via LiteLLM or LangChain - **Framework**: Currently supported frameworks include CrewAI, LangGraph, OpenAI Swarms and LlamaStack - Roadmap: Pydantic AI, Eliza, AG2 and Autogen - **Tools**: Maintaining the largest repository of framework-agnostic tools! All tools listed [here](https://docs.agentstack.sh/tools/community) - **Observability**: AgentOps baked in by default with first-tier support ### Get Started Immediately You **don't** need to install or configure tools like LangChain or LlamaIndex.<br> They are preconfigured and hidden so that you can focus on the code. Create a project, and you're good to go. ## Creating an Agent Project **You'll need to have Python 3.10+ on your local development machine**. We recommend using the latest version. You can use [pyenv](https://github.com/pyenv/pyenv) to switch Python versions between different projects. To create a new agent project, run: ```sh uv pip install agentstack # or other install method agentstack init <project_name> ``` It will create a directory with your project name inside the current folder.<br> Inside that directory, it will generate the initial project structure and install the transitive dependencies. No configuration or complicated folder structures, only the files you need to build your agent project.<br> Once the initialization is done, you can open your project folder: ```sh cd <your_agent_project> uv pip install ``` then run the default agent! ```sh agentstack run ``` ### Templates Additionally, pre-built templates are available as a shortcut to building your project. [View the available templates](https://docs.agentstack.sh/templates). ## Building Agent Functionality After generating a project, the next step is to build your agent project by creating Agents and Tasks. You can do this quickly with AgentStack: ```bash agentstack generate agent/task <name> ``` Modify the agents and tasks by changing the `agents.yaml` and `tasks.yaml` configuration files in `src/config` ## Tooling One of AgentStack's core principles is to establish the de facto agent _stack_. A critical component of this stack is the tooling and functionality given to agents beyond simply LLM capabilities. AgentStack has worked to make access to tools as easy as possible, staying framework agnostic and featuring the best tools. A list of all tools can be found [on our docs](https://docs.agentstack.sh/tools/core). Adding tools is as simple as ```bash agentstack tools add ``` ## Running Your Agent `agentstack run` Runs the agent project in development mode.<br> > 👀 Support for easy production deployment of agents is coming soon. ## Philosophy - **Agents should be easy:** There are so many frameworks out there, but starting from scratch is a pain. Similar to `create-react-app`, AgentStack aims to simplify the "from scratch" process by giving you a simple boilerplate of an agent. It uses popular agent frameworks and LLM providers, but provides a cohesive curated experience on top of them. - **No Configuration Required:** You don't need to configure anything. A reasonably good configuration of both development and production builds is handled for you so you can focus on writing code. - **No Lock-In:** You can customize your setup at any time. AgentStack is designed to make it easy to get the components you need running right off the bat; it's up to you what to do next. - **Provider Agnosticism:** AgentStack is designed to be provider agnostic in all ways. This means especially that the framework layer of your agent stack should be interoperable with every other layer. Frameworks must still be supported by AgentStack. See supported frameworks above. AgentStack is not designed to be a low-code solution to building agents. Instead it is a great head-start for starting an agent project from scratch. ## Roadmap ### Tools - More [core tools](https://docs.agentstack.sh/tools/core) built by AgentStack - Preferred partners in the package directly - Community partner tools added through external repositories ### New Stack Layers - Prompting layer (DSPy) - Eval Layer - UI layer ### Other Features - Generated testing - Integrated benchmarking - Easy integration of tools for browsing, RAG, and more. - A fast interactive test runner with built-in support for coverage reporting. - A live development server that warns about common mistakes (in progress). - A build script to bundle your project for production (in progress). ## License AgentStack is open source software [licensed as MIT](LICENSE). ## How to Contribute AgentStack is a new project built by passionate AI agent developers! We'd love help making this tool better. Easy first issues are available, create new issues with feature ideas, or chat with us on our [Discord](https://discord.gg/JdWkh9tgTQ). Make sure you read our contributor documentation to familiarize yourself with the project at [How to Contribute](https://docs.agentstack.sh/contributing/how-to-contribute). If you are an Agent Tool developer, feel free to create an issue or even a PR to add your tool to AgentStack.
{ "source": "AgentOps-AI/AgentStack", "title": "README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 7153 }
## Wizard ## LangGraph [ ] Bug: empty `bind_tools` list on a new Agent throws an error [ ] Reliably handle adding two Tasks and two Agent via CLI [ ] Create a new template demonstrating graph usage "Top of Funnel" [√] Hello World! [√] Catch common exception types from the user's first `agentstack run` and provide a helpful error message. - In order to avoid importing all the sub-libraries, use string matching to determine what the exception is. [√] Allow the user to select from a list of tools if a <tool_name> is not provided to `agenstack add tools` [ ] Handle all setup tasks that `agentstack init` needs. - Wrap the output in a `curses` window to show progress. - Prevent the user from having to scroll back up to find the help text from the `init` command. - Use `uv` for all package management. [√] Modify agentops init to indicate which tools are being used. - Possibly with an `agentstack.get_tags()` method that automatically sets relevant tags. [√] If there is only one agent in the project, treat it as a default. - New tasks should be assigned to it. [√] Wrap tools in the framework's protocol before including them in the project. - Access tools with `agentstack.tools['tool_name']` which dynamically generates the wrapped tool. - This will be a breaking change with the 0.3 release.
{ "source": "AgentOps-AI/AgentStack", "title": "TODO.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/TODO.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1353 }
## 📥 Pull Request **📘 Description** _Briefly describe the changes you've made._ **🧪 Testing** _Describe the tests you performed to validate your changes._
{ "source": "AgentOps-AI/AgentStack", "title": ".github/PULL_REQUEST_TEMPLATE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/.github/PULL_REQUEST_TEMPLATE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 156 }
# Docs ## Building To build and view docs from this folder, install the Mintlify CLI: ```bash pip install mintlify ``` then serve it with ```bash mintlify dev ```
{ "source": "AgentOps-AI/AgentStack", "title": "docs/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/docs/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 165 }
MIT License Copyright (c) 2024 me Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/howards_agent/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/howards_agent/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1058 }
# howards_agent desc ~~ Built with AgentStack ~~ ## How to build your Crew ### With the CLI Add an agent using AgentStack with the CLI: `agentstack generate agent <agent_name>` You can also shorten this to `agentstack g a <agent_name>` For wizard support use `agentstack g a <agent_name> --wizard` Finally for creation in the CLI alone, use `agentstack g a <agent_name> --role/-r <role> --goal/-g <goal> --backstory/-b <backstory> --model/-m <provider/model>` This will automatically create a new agent in the `agents.yaml` config as well as in your code. Either placeholder strings will be used, or data included in the wizard. Similarly, tasks can be created with `agentstack g t <tool_name>` Add tools with `agentstack tools add <tool_name>` and view tools available with `agentstack tools list` ## How to use your Crew In this directory, run `poetry install` To run your project, use the following command: `crewai run` or `python src/main.py` This will initialize your crew of AI agents and begin task execution as defined in your configuration in the main.py file. #### Replay Tasks from Latest Crew Kickoff: CrewAI now includes a replay feature that allows you to list the tasks from the last run and replay from a specific one. To use this feature, run: `crewai replay <task_id>` Replace <task_id> with the ID of the task you want to replay. #### Reset Crew Memory If you need to reset the memory of your crew before running it again, you can do so by calling the reset memory feature: `crewai reset-memory` This will clear the crew's memory, allowing for a fresh start.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/howards_agent/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/howards_agent/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1609 }
MIT License Copyright (c) 2024 me Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/job_posting/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/job_posting/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1058 }
# job_posting _An example project built with AgentStack_ ## Commands used to create this project ```bash agentstack init job_posting agentstack g a research_agent agentstack g a writer_agent agentstack g a review_agent agentstack g t research_company_culture_task agentstack g t research_role_requirements_task agentstack g t draft_job_posting_task agentstack g t review_and_edit_job_posting_task agentstack g t industry_analysis_task agentstack tools add firecrawl ``` ## Other work - Prompt engineering was done in `agents.yaml` and `tasks.yaml` - Inputs were modified in `crew.py` - Firecrawl API key added to `.env` ## Run this agent ```bash agentstack run ```
{ "source": "AgentOps-AI/AgentStack", "title": "examples/job_posting/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/job_posting/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 668 }
MIT License Copyright (c) 2025 Name <Email> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/research_assistant/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/research_assistant/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1068 }
# research_assistant ## How to build your Crew Agent ### With the CLI Add an agent using AgentStack with the CLI: `agentstack generate agent <agent_name>` You can also shorten this to `agentstack g a <agent_name>` For wizard support use `agentstack g a <agent_name> --wizard` Finally for creation in the CLI alone, use `agentstack g a <agent_name> --role/-r <role> --goal/-g <goal> --backstory/-b <backstory> --model/-m <provider/model>` This will automatically create a new agent in the `agents.yaml` config as well as in your code. Either placeholder strings will be used, or data included in the wizard. Similarly, tasks can be created with `agentstack g t <tool_name>` Add tools with `agentstack tools add` and view tools available with `agentstack tools list` ## How to use your Agent In this directory, run `uv pip install --requirements pyproject.toml` To run your project, use the following command: `agentstack run` This will initialize your crew of AI agents and begin task execution as defined in your configuration in the main.py file. #### Replay Tasks from Latest Crew Kickoff: CrewAI now includes a replay feature that allows you to list the tasks from the last run and replay from a specific one. To use this feature, run: `crewai replay <task_id>` Replace <task_id> with the ID of the task you want to replay. #### Reset Crew Memory If you need to reset the memory of your crew before running it again, you can do so by calling the reset memory feature: `crewai reset-memory` This will clear the crew's memory, allowing for a fresh start. > 🪩 Project built with [AgentStack](https://github.com/AgentOps-AI/AgentStack)
{ "source": "AgentOps-AI/AgentStack", "title": "examples/research_assistant/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/research_assistant/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1664 }
MIT License Copyright (c) 2025 Name <Email> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/sentiment_analyser/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/sentiment_analyser/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1068 }
# sentiment_analyser This is the start of your AgentStack project. ## How to build your Crew ### With the CLI Add an agent using AgentStack with the CLI: `agentstack generate agent <agent_name>` You can also shorten this to `agentstack g a <agent_name>` For wizard support use `agentstack g a <agent_name> --wizard` Finally for creation in the CLI alone, use `agentstack g a <agent_name> --role/-r <role> --goal/-g <goal> --backstory/-b <backstory> --model/-m <provider/model>` This will automatically create a new agent in the `agents.yaml` config as well as in your code. Either placeholder strings will be used, or data included in the wizard. Similarly, tasks can be created with `agentstack g t <tool_name>` Add tools with `agentstack tools add` and view tools available with `agentstack tools list` ## How to use your Crew In this directory, run `poetry install` To run your project, use the following command: `agentstack run` This will initialize your crew of AI agents and begin task execution as defined in your configuration in the main.py file. #### Replay Tasks from Latest Crew Kickoff: CrewAI now includes a replay feature that allows you to list the tasks from the last run and replay from a specific one. To use this feature, run: `crewai replay <task_id>` Replace <task_id> with the ID of the task you want to replay. #### Reset Crew Memory If you need to reset the memory of your crew before running it again, you can do so by calling the reset memory feature: `crewai reset-memory` This will clear the crew's memory, allowing for a fresh start. > 🪩 Project built with [AgentStack](https://github.com/AgentOps-AI/AgentStack)
{ "source": "AgentOps-AI/AgentStack", "title": "examples/sentiment_analyser/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/sentiment_analyser/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1674 }
MIT License Copyright (c) 2024 me Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/stock_analysis/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/stock_analysis/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1058 }
# stock_analysis asdf ~~ Built with AgentStack ~~ ## How to build your Crew ### With the CLI Add an agent using AgentStack with the CLI: `agentstack generate agent <agent_name>` You can also shorten this to `agentstack g a <agent_name>` For wizard support use `agentstack g a <agent_name> --wizard` Finally for creation in the CLI alone, use `agentstack g a <agent_name> --role/-r <role> --goal/-g <goal> --backstory/-b <backstory> --model/-m <provider/model>` This will automatically create a new agent in the `agents.yaml` config as well as in your code. Either placeholder strings will be used, or data included in the wizard. Similarly, tasks can be created with `agentstack g t <tool_name>` Add tools with `agentstack tools add <tool_name>` and view tools available with `agentstack tools list` ## How to use your Crew In this directory, run `poetry install` To run your project, use the following command: `crewai run` or `python src/main.py` This will initialize your crew of AI agents and begin task execution as defined in your configuration in the main.py file. #### Replay Tasks from Latest Crew Kickoff: CrewAI now includes a replay feature that allows you to list the tasks from the last run and replay from a specific one. To use this feature, run: `crewai replay <task_id>` Replace <task_id> with the ID of the task you want to replay. #### Reset Crew Memory If you need to reset the memory of your crew before running it again, you can do so by calling the reset memory feature: `crewai reset-memory` This will clear the crew's memory, allowing for a fresh start.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/stock_analysis/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/stock_analysis/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1610 }
MIT License Copyright (c) 2024 Braelyn Boynton Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/trip_planner/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/trip_planner/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1071 }
# trip_planner 🍄 > Example credit to CrewAI A team of agents that expertly design a trip ~~ Built with AgentStack ~~ ## How to build your Crew ### With the CLI Add an agent using AgentStack with the CLI: `agentstack generate agent <agent_name>` You can also shorten this to `agentstack g a <agent_name>` For wizard support use `agentstack g a <agent_name> --wizard` Finally for creation in the CLI alone, use `agentstack g a <agent_name> --role/-r <role> --goal/-g <goal> --backstory/-b <backstory> --model/-m <provider/model>` This will automatically create a new agent in the `agents.yaml` config as well as in your code. Either placeholder strings will be used, or data included in the wizard. Similarly, tasks can be created with `agentstack g t <tool_name>` Add tools with `agentstack tools add <tool_name>` and view tools available with `agentstack tools list` ## How to use your Crew In this directory, run `poetry install` To run your project, use the following command: `crewai run` This will initialize your crew of AI agents and begin task execution as defined in your configuration in the main.py file. #### Replay Tasks from Latest Crew Kickoff: CrewAI now includes a replay feature that allows you to list the tasks from the last run and replay from a specific one. To use this feature, run: `crewai replay <task_id>` Replace <task_id> with the ID of the task you want to replay. #### Reset Crew Memory If you need to reset the memory of your crew before running it again, you can do so by calling the reset memory feature: `crewai reset-memory` This will clear the crew's memory, allowing for a fresh start.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/trip_planner/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/trip_planner/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1655 }
Please see the detailed 7-day itinerary, packing suggestions, and budget breakdown above. Be aware that rates can change and availability might vary; make sure to book your accommodations and activities in advance! Enjoy your trip and immerse yourself in the rich history, culture, art, and music of Berlin!
{ "source": "AgentOps-AI/AgentStack", "title": "examples/trip_planner/itinerary.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/trip_planner/itinerary.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 308 }
MIT License Copyright (c) 2024 me Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/web_researcher/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/web_researcher/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1058 }
# web_researcher research a web page and create a short description ~~ Built with AgentStack ~~ ## How to build your Crew ### With the CLI Add an agent using AgentStack with the CLI: `agentstack generate agent <agent_name>` You can also shorten this to `agentstack g a <agent_name>` For wizard support use `agentstack g a <agent_name> --wizard` Finally for creation in the CLI alone, use `agentstack g a <agent_name> --role/-r <role> --goal/-g <goal> --backstory/-b <backstory> --model/-m <provider/model>` This will automatically create a new agent in the `agents.yaml` config as well as in your code. Either placeholder strings will be used, or data included in the wizard. Similarly, tasks can be created with `agentstack g t <tool_name>` Add tools with `agentstack tools add <tool_name>` and view tools available with `agentstack tools list` ## How to use your Crew In this directory, run `poetry install` To run your project, use the following command: `crewai run` or `python src/main.py` This will initialize your crew of AI agents and begin task execution as defined in your configuration in the main.py file. #### Replay Tasks from Latest Crew Kickoff: CrewAI now includes a replay feature that allows you to list the tasks from the last run and replay from a specific one. To use this feature, run: `crewai replay <task_id>` Replace <task_id> with the ID of the task you want to replay. #### Reset Crew Memory If you need to reset the memory of your crew before running it again, you can do so by calling the reset memory feature: `crewai reset-memory` This will clear the crew's memory, allowing for a fresh start.
{ "source": "AgentOps-AI/AgentStack", "title": "examples/web_researcher/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/examples/web_researcher/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1656 }
{%- if cookiecutter.project_metadata.license == "MIT" %} MIT License Copyright (c) {{ cookiecutter.project_metadata.year }} {{ cookiecutter.project_metadata.author_name }} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. {%- endif %} {%- if cookiecutter.project_metadata.license == "Apache-2.0" %} Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {{ cookiecutter.project_metadata.year }} {{ cookiecutter.project_metadata.author_name }} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. {%- endif %} {%- if cookiecutter.project_metadata.license == "GNU" %} GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. “This License” refers to version 3 of the GNU General Public License. “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS {%- endif %}
{ "source": "AgentOps-AI/AgentStack", "title": "agentstack/frameworks/templates/autogen/{{cookiecutter.project_metadata.project_slug}}/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/agentstack/frameworks/templates/autogen/{{cookiecutter.project_metadata.project_slug}}/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 44559 }
# {{ cookiecutter.project_metadata.project_name }} {{ cookiecutter.project_metadata.description }}
{ "source": "AgentOps-AI/AgentStack", "title": "agentstack/frameworks/templates/autogen/{{cookiecutter.project_metadata.project_slug}}/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/agentstack/frameworks/templates/autogen/{{cookiecutter.project_metadata.project_slug}}/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 98 }
{%- if cookiecutter.project_metadata.license == "MIT" %} MIT License Copyright (c) {{ cookiecutter.project_metadata.year }} {{ cookiecutter.project_metadata.author_name }} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. {%- endif %} {%- if cookiecutter.project_metadata.license == "Apache-2.0" %} Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {{ cookiecutter.project_metadata.year }} {{ cookiecutter.project_metadata.author_name }} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. {%- endif %} {%- if cookiecutter.project_metadata.license == "GNU" %} GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. “This License” refers to version 3 of the GNU General Public License. “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS {%- endif %}
{ "source": "AgentOps-AI/AgentStack", "title": "agentstack/frameworks/templates/crewai/{{cookiecutter.project_metadata.project_slug}}/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/agentstack/frameworks/templates/crewai/{{cookiecutter.project_metadata.project_slug}}/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 44559 }
# {{ cookiecutter.project_metadata.project_name }} {{ cookiecutter.project_metadata.description }} ## How to build your Crew Agent ### With the CLI Add an agent using AgentStack with the CLI: `agentstack generate agent <agent_name>` You can also shorten this to `agentstack g a <agent_name>` For wizard support use `agentstack g a <agent_name> --wizard` Finally for creation in the CLI alone, use `agentstack g a <agent_name> --role/-r <role> --goal/-g <goal> --backstory/-b <backstory> --model/-m <provider/model>` This will automatically create a new agent in the `agents.yaml` config as well as in your code. Either placeholder strings will be used, or data included in the wizard. Similarly, tasks can be created with `agentstack g t <tool_name>` Add tools with `agentstack tools add` and view tools available with `agentstack tools list` ## How to use your Agent In this directory, run `uv pip install --requirements pyproject.toml` To run your project, use the following command: `agentstack run` This will initialize your crew of AI agents and begin task execution as defined in your configuration in the main.py file. #### Replay Tasks from Latest Crew Kickoff: CrewAI now includes a replay feature that allows you to list the tasks from the last run and replay from a specific one. To use this feature, run: `crewai replay <task_id>` Replace <task_id> with the ID of the task you want to replay. #### Reset Crew Memory If you need to reset the memory of your crew before running it again, you can do so by calling the reset memory feature: `crewai reset-memory` This will clear the crew's memory, allowing for a fresh start. > 🪩 Project built with [AgentStack](https://github.com/AgentOps-AI/AgentStack)
{ "source": "AgentOps-AI/AgentStack", "title": "agentstack/frameworks/templates/crewai/{{cookiecutter.project_metadata.project_slug}}/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/agentstack/frameworks/templates/crewai/{{cookiecutter.project_metadata.project_slug}}/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1741 }
{%- if cookiecutter.project_metadata.license == "MIT" %} MIT License Copyright (c) {{ cookiecutter.project_metadata.year }} {{ cookiecutter.project_metadata.author_name }} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. {%- endif %} {%- if cookiecutter.project_metadata.license == "Apache-2.0" %} Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {{ cookiecutter.project_metadata.year }} {{ cookiecutter.project_metadata.author_name }} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. {%- endif %} {%- if cookiecutter.project_metadata.license == "GNU" %} GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. “This License” refers to version 3 of the GNU General Public License. “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS {%- endif %}
{ "source": "AgentOps-AI/AgentStack", "title": "agentstack/frameworks/templates/langgraph/{{cookiecutter.project_metadata.project_slug}}/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/agentstack/frameworks/templates/langgraph/{{cookiecutter.project_metadata.project_slug}}/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 44559 }
# {{ cookiecutter.project_metadata.project_name }} {{ cookiecutter.project_metadata.description }} ## How to build your LangGraph Agent ### With the CLI Add an agent using AgentStack with the CLI: `agentstack generate agent <agent_name>` You can also shorten this to `agentstack g a <agent_name>` For wizard support use `agentstack g a <agent_name> --wizard` Finally for creation in the CLI alone, use `agentstack g a <agent_name> --role/-r <role> --goal/-g <goal> --backstory/-b <backstory> --model/-m <provider/model>` This will automatically create a new agent in the `agents.yaml` config as well as in your code. Either placeholder strings will be used, or data included in the wizard. Similarly, tasks can be created with `agentstack g t <tool_name>` Add tools with `agentstack tools add` and view tools available with `agentstack tools list` ## How to use your Agent In this directory, run `uv pip install --requirements pyproject.toml` To run your project, use the following command: `agentstack run` This will initialize your AI agent project and begin task execution as defined in your configuration in the main.py file. > 🪩 Project built with [AgentStack](https://github.com/AgentOps-AI/AgentStack)
{ "source": "AgentOps-AI/AgentStack", "title": "agentstack/frameworks/templates/langgraph/{{cookiecutter.project_metadata.project_slug}}/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/agentstack/frameworks/templates/langgraph/{{cookiecutter.project_metadata.project_slug}}/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1228 }
{%- if cookiecutter.project_metadata.license == "MIT" %} MIT License Copyright (c) {{ cookiecutter.project_metadata.year }} {{ cookiecutter.project_metadata.author_name }} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. {%- endif %} {%- if cookiecutter.project_metadata.license == "Apache-2.0" %} Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {{ cookiecutter.project_metadata.year }} {{ cookiecutter.project_metadata.author_name }} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. {%- endif %} {%- if cookiecutter.project_metadata.license == "GNU" %} GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. “This License” refers to version 3 of the GNU General Public License. “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS {%- endif %}
{ "source": "AgentOps-AI/AgentStack", "title": "agentstack/frameworks/templates/llamaindex/{{cookiecutter.project_metadata.project_slug}}/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/agentstack/frameworks/templates/llamaindex/{{cookiecutter.project_metadata.project_slug}}/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 44559 }
# {{ cookiecutter.project_metadata.project_name }} {{ cookiecutter.project_metadata.description }} ## How to build your LlamaIndex Agent ### With the CLI Add an agent using AgentStack with the CLI: `agentstack generate agent <agent_name>` You can also shorten this to `agentstack g a <agent_name>` For wizard support use `agentstack g a <agent_name> --wizard` Finally for creation in the CLI alone, use `agentstack g a <agent_name> --role/-r <role> --goal/-g <goal> --backstory/-b <backstory> --model/-m <provider/model>` This will automatically create a new agent in the `agents.yaml` config as well as in your code. Either placeholder strings will be used, or data included in the wizard. Similarly, tasks can be created with `agentstack g t <tool_name>` Add tools with `agentstack tools add` and view tools available with `agentstack tools list` ## How to use your Agent In this directory, run `uv pip install --requirements pyproject.toml` To run your project, use the following command: `agentstack run` This will initialize your AI agent project and begin task execution as defined in your configuration in the main.py file. > 🪩 Project built with [AgentStack](https://github.com/AgentOps-AI/AgentStack)
{ "source": "AgentOps-AI/AgentStack", "title": "agentstack/frameworks/templates/llamaindex/{{cookiecutter.project_metadata.project_slug}}/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/agentstack/frameworks/templates/llamaindex/{{cookiecutter.project_metadata.project_slug}}/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1229 }
{%- if cookiecutter.project_metadata.license == "MIT" %} MIT License Copyright (c) {{ cookiecutter.project_metadata.year }} {{ cookiecutter.project_metadata.author_name }} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. {%- endif %} {%- if cookiecutter.project_metadata.license == "Apache-2.0" %} Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {{ cookiecutter.project_metadata.year }} {{ cookiecutter.project_metadata.author_name }} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. {%- endif %} {%- if cookiecutter.project_metadata.license == "GNU" %} GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. “This License” refers to version 3 of the GNU General Public License. “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS {%- endif %}
{ "source": "AgentOps-AI/AgentStack", "title": "agentstack/frameworks/templates/openai_swarm/{{cookiecutter.project_metadata.project_slug}}/LICENSE.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/agentstack/frameworks/templates/openai_swarm/{{cookiecutter.project_metadata.project_slug}}/LICENSE.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 44559 }
# {{ cookiecutter.project_metadata.project_name }} {{ cookiecutter.project_metadata.description }} ## How to build your OpenAI Swarm Agent ### With the CLI Add an agent using AgentStack with the CLI: `agentstack generate agent <agent_name>` You can also shorten this to `agentstack g a <agent_name>` For wizard support use `agentstack g a <agent_name> --wizard` Finally for creation in the CLI alone, use `agentstack g a <agent_name> --role/-r <role> --goal/-g <goal> --backstory/-b <backstory> --model/-m <provider/model>` This will automatically create a new agent in the `agents.yaml` config as well as in your code. Either placeholder strings will be used, or data included in the wizard. Similarly, tasks can be created with `agentstack g t <tool_name>` Add tools with `agentstack tools add` and view tools available with `agentstack tools list` ## How to use your Agent In this directory, run `uv pip install --requirements pyproject.toml` To run your project, use the following command: `agentstack run` This will initialize your AI agent project and begin task execution as defined in your configuration in the main.py file. > 🪩 Project built with [AgentStack](https://github.com/AgentOps-AI/AgentStack)
{ "source": "AgentOps-AI/AgentStack", "title": "agentstack/frameworks/templates/openai_swarm/{{cookiecutter.project_metadata.project_slug}}/README.md", "url": "https://github.com/AgentOps-AI/AgentStack/blob/main/agentstack/frameworks/templates/openai_swarm/{{cookiecutter.project_metadata.project_slug}}/README.md", "date": "2024-09-18T21:40:53", "stars": 1684, "description": "The fastest way to build robust AI agents", "file_size": 1231 }
# Contribute to *OpenR* > Every contribution, no matter how small, is valuable to the community. Thank you for your interest in ***OpenR*** ! 🥰 We are deeply committed to the open-source community, and we welcome contributions from everyone. Your efforts, whether big or small, help us grow and improve. Contributions aren’t limited to code—answering questions, helping others, enhancing our documentation, and sharing the project are equally impactful. ## Ways to contribute There are several ways you can contribute to ***OpenR***: - Fix existing issues in the codebase. - Report bugs or suggest new features by submitting issues. - Implement new models or features. - Improve our examples or contribute to the documentation. The best way to do that is to open a **Pull Request** and link it to the **issue** that you'd like to work on. We try to give priority to opened PRs as we can easily track the progress of the fix, and if the contributor does not have time anymore, someone else can take the PR over. ## Create a Pull Request > This guide was heavily inspired by [huggingface guide to contribution](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request) You will need basic `git` proficiency to contribute to ***OpenR***. While `git` is not the easiest tool to use, it has the greatest manual. Type `git --help` in a shell and enjoy! If you prefer books, [Pro Git](https://git-scm.com/book/en/v2) is a very good reference. Follow the steps below to start contributing: 1. Fork the [repository](https://github.com/openreasoner/openr) by clicking on the **[Fork](https://github.com/openreasoner/openr/fork)** button on the repository's page. This creates a copy of the code under your GitHub user account. 2. Clone your fork to your local disk, and add the base repository as a remote: ```bash git clone [email protected]:<your Github handle>/openr.git cd openr git remote add upstream https://github.com/openreasoner/openr.git ``` 3. Create a new branch to hold your development changes: ```bash git checkout -b a-descriptive-name-for-my-changes ``` 🚨 **Do not** work on the `main` branch! 4. Set up a development environment by following the [README](https://github.com/openreasoner/openr/blob/main/README.md) file. 5. Develop the features in your branch. Once you're happy with your changes, add the changed files with `git add` and record your changes locally with `git commit`: ```bash git add modified_file.py git commit ``` Please remember to write [good commit messages](https://chris.beams.io/posts/git-commit/) to clearly communicate the changes you made! To keep your copy of the code up to date with the original repository, rebase your branch on `upstream/branch` *before* you open a pull request or if requested by a maintainer: ```bash git fetch upstream git rebase upstream/main ``` Push your changes to your branch: ```bash git push -u origin a-descriptive-name-for-my-changes ``` If you've already opened a pull request, you'll need to force push with the `--force` flag. Otherwise, if the pull request hasn't been opened yet, you can just push your changes normally. 6. Now you can go to your fork of the repository on GitHub and click on **Pull Request** to open a pull request. When you're ready, you can send your changes to the project maintainers for review. 7. It's ok if maintainers request changes, it happens to our core contributors too! So everyone can see the changes in the pull request, work in your local branch and push the changes to your fork. They will automatically appear in the pull request.
{ "source": "openreasoner/openr", "title": "CONTRIBUTING.md", "url": "https://github.com/openreasoner/openr/blob/main/CONTRIBUTING.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 3711 }
<div id="top"></div> <!-- *** Thanks for checking out the Best-README-Template. If you have a suggestion *** that would make this better, please fork the repo and create a pull request *** or simply open an issue with the tag "enhancement". *** Don't forget to give the project a star! *** Thanks again! Now go create something AMAZING! :D --> <!-- PROJECT SHIELDS --> <!-- *** I'm using markdown "reference style" links for readability. *** Reference links are enclosed in brackets [ ] instead of parentheses ( ). *** See the bottom of this document for the declaration of the reference variables *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use. *** https://www.markdownguide.org/basic-syntax/#reference-style-links --> <!-- ***[![MIT License][license-shield]][license-url] --> <!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/openreasoner/openr/"> <img src="figure/openr_logo.png" alt="Logo" width="200"> </a> <h1 align="center" style="font-size: 30px;"><strong><em>OpenR</em></strong>: An Open Source Framework for Advanced Reasoning with Large Language Models</h1> <p align="center"> <a href="https://arxiv.org/abs/2410.09671">Paper</a> · <a href="https://github.com/openreasoner/openr/blob/main/reports/Tutorial-LLM-Reasoning-Wang.pdf">Tutorial</a> · <a href="https://github.com/openreasoner/openr">Code</a> · <a href="https://openreasoner.github.io/">Docs</a> · <a href="https://huggingface.co/datasets/openreasoner/MATH-APS">Data</a> · <a href="https://huggingface.co/openreasoner/Math-psa">Model</a> · <a href="https://github.com/openreasoner/openr/issues">Issue</a> · <a href="https://www.modelscope.cn/studios/modelscope/OpenR_Inference">Demo</a> </p> <p align="center"> [ <a href="https://github.com/openreasoner/openr/blob/main/README.md">English</a> ][ <a href="https://github.com/openreasoner/openr/blob/main/README_zh.md">中文</a> ] </p> </div> --- [![GitHub contributors](https://img.shields.io/github/contributors/openreasoner/openr)][contributors-url] [![arXiv](https://img.shields.io/badge/ArXiv-2410.09671-b31b1b.svg)](https://arxiv.org/pdf/2410.09671) ![GitHub License](https://img.shields.io/github/license/openreasoner/openr) [![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/openreasoner/openr)][issues-url] [![GitHub forks](https://img.shields.io/github/forks/openreasoner/openr)][forks-url] [![GitHub Repo stars](https://img.shields.io/github/stars/openreasoner/openr)][stars-url] [![HuggingFace Dataset](https://img.shields.io/badge/Hugging%20Face-FFD21E?logo=huggingface&logoColor=000)](https://huggingface.co/openreasoner) [![X](https://img.shields.io/badge/openreasoner-%23000000.svg?logo=X&logoColor=white)](https://x.com/openreasoner) [![WeChat](https://img.shields.io/badge/WeChat_Group-07C160?logo=wechat&logoColor=white)](#community) <!-- TABLE OF CONTENTS --> <details> <summary><span style="font-size: 1.5em;"><strong>Table of Contents</strong> 📖 </span></summary> <ol> <li><a href="#news-and-updates">News and Updates</a></li> <li><a href="#features">Features</a></li> <li><a href="#todo">TODO</a></li> <li><a href="#benchmark">Benchmark</a></li> <li><a href="#plots">Plots</a></li> <li><a href="#provided-datasets-and-models">Datasets and Models</a></li> <li> <a href="#getting-started">Getting Started</a> <ul> <li><a href="#installation">Installation</a></li> <li><a href="#quickstart">Quick Start</a></li> </ul> </li> <li><a href="#usage">Usage</a></li> <li><a href="#join-us">Join Us</a></li> <li><a href="#contact">Contact</a></li> <li><a href="#response-examples">Response Examples</a></li> <li><a href="#community">Community</a></li> <li><a href="#reference">Reference</a></li> </ol> </details> <!-- News and Updates --> ## News and Updates - **[29/11/2024]** We have now added a [**demo**](https://www.modelscope.cn/studios/modelscope/OpenR_Inference) page on *ModelScope*. Many thanks to [@wangxingjun778](https://github.com/wangxingjun778) ! - **[24/10/2024]** ***OpenR*** now supports **MCTS** reasoning ([#24](https://github.com/openreasoner/openr/pull/24))! 🌲 - **[15/10/2024]** Our report is on [**Arxiv**](https://arxiv.org/abs/2410.09671)! - **[12/10/2024]** ***OpenR*** has been released! 🚀 ## Features <p align="center"> <img src="./figure/logo_text.png" alt="Description" style="width: 300px; margin-left: 50px; float: right;"> </p> | Feature | Contents | |----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ✅ Process-supervision Data Generation | - [**OmegaPRM**](https://arxiv.org/abs/2406.06592): Improve Mathematical Reasoning in Language Models by Automated Process Supervision | | ✅ Online Policy Training | - [**RL Training**](train/mat/trainers): APPO, GRPO, TPPO; | | ✅ Generative and Discriminative PRM Training | - [**PRM Training**](prm/code): Supervised Training for PRMs<br> - **Generative RM Training**: [Direct GenRM](gen_rm/) | | ✅ Multiple Search Strategies | - **Greedy Search**<br> - **Best-of-N**<br> - **Beam Search**<br> - **MCTS**<br> - [**rStar**](https://arxiv.org/pdf/2408.06195v1): Mutual Reasoning Makes Smaller LLMs Stronger Problem-Solvers<br> - **Critic-MCTS**: [Under Review](https://github.com/openreasoner/openr/pull/44) | | ✅ Test-time Computation and Scaling Law | TBA, see [benchmark](#benchmark) | ## TODO | Feature | TODO (<span style="color:red;">High Priority</span>, We value you contribution!) | |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 👨‍💻Data | - Re-implement [**Journey Learning**](https://arxiv.org/abs/2410.18982) | | 👨‍💻RL Training | - Distributed Training<br/>- Reinforcement Fine-Tuning (RFT) [#80](https://github.com/openreasoner/openr/issues/80) | | 👨‍💻PRM | - Larger-scale training<br> - GenRM-CoT implementation <br/>- Soft-label training [#57](https://github.com/openreasoner/openr/issues/57) | | 👨‍💻Reasoning | - Optimize code structure [#53](https://github.com/openreasoner/openr/pull/53) <br> - More tasks on reasoning (AIME, etc.) [#53](https://github.com/openreasoner/openr/pull/53) <br> - Multi-modal reasoning [#82](https://github.com/openreasoner/openr/issues/82) <br> - Reasoning in code generation [#68](https://github.com/openreasoner/openr/pull/68) <br/> - Dots [#75](https://github.com/openreasoner/openr/pull/75) <br/> - Consistency check <br/> - Benchmarking | ## Benchmark See [Benchmark](benchmark) ! ## Plots <p align="center"> <img src="./figure/compare_prm_by_boN.png" alt="PRM_Results" width="45%" /> <img src="./figure/MATH_subsampled.png" alt="Inference_Results" width="45%" /> </p> ## Provided Datasets and Models [//]: # ([PRM800K]&#40;https://github.com/openai/prm800k&#41; &#40;Process Supervision Dataset&#41;) [MATH-APS](https://huggingface.co/datasets/mengfang/MATH-APS) (Our Dataset) [MATH-psa](https://huggingface.co/openreasoner/Math-psa) (Our Process Reward Model) ## Getting Started ### Installation ``` conda create -n open_reasoner python=3.10 conda activate open_reasoner pip install -r requirements.txt pip3 install "fschat[model_worker,webui]" pip install -U pydantic cd envs/MATH/latex2sympy pip install -e . cd - ``` ### Download Base Models Before running the project, please ensure that all required base models are downloaded. The models used in this project include: - `Qwen2.5-Math-1.5B-Instruct`, `Qwen2.5-Math-7B-Instruct` - `peiyi9979/mistral-7b-sft` - `peiyi9979/math-shepherd-mistral-7b-prm` To download these models, please refer to the [Hugging Face model downloading tutorial](https://huggingface.co/docs/hub/models-downloading) for step-by-step guidance on downloading models from the Hugging Face Hub. Please make sure that all models are saved in their directories according to the project setup before proceeding. ### Quickstart Before running inference, please modify the following variables in the scripts under `reason/llm_service/` to set the appropriate base models for your usage: - `$MODEL_BASE`: Set this to the directory where your models are stored. - `$POLICY_MODEL_NAME`: Set this to the name of the policy model you wish to use. - `$VALUE_MODEL_NAME`: Set this to the name of the value model you wish to use. - `$NUM_LM_WORKER`: Set this to the number of language model (LM) workers to start. - `$NUM_RM_WORKER`: Set this to the number of reward model (RM) workers to start. Then it prepares and runs inference using different techniques. #### Start LM & RM Services For example, to start the LM and RM services for the Math Shepherd model, run the following command: ```bash sh reason/llm_service/create_service_math_shepherd.sh ``` To kill the server processes, recommend using the following command: ```bash tmux kill-session -t {Your Session Name} # default is `FastChat` ``` ## Usage #### Run Inference ⚠️ Make sure the input (`--LM`, `--RM`) in the script aligns with the variables (`$POLICY_MODEL_NAME`, `$VALUE_MODEL_NAME`) in the pending worker! ```bash export PYTHONPATH=$(pwd) sh scripts/eval/cot_greedy.sh # Method: cot. Average result: ({'majority_vote': 0.734, 'total_completion_tokens': 559.13},) sh scripts/eval/cot_rerank.sh # Method: best_of_n. Average result: ({'majority_vote': 0.782, # 'prm_min_max': 0.772, # 'prm_min_vote': 0.792, # 'prm_last_max': 0.776, # 'prm_last_vote': 0.792, # 'total_completion_tokens': 4431.268},) sh scripts/eval/beam_search.sh # Method: beam_search. Average result: ({'majority_vote': 0.74, 'total_completion_tokens': 2350.492},) sh scripts/eval/vanila_mcts.sh ``` #### Run Training ⚠️ Before training, please modify the `$dataset_path`, `$model_name_or_path` and `$prm_name_or_path` in `train/mat/scripts/train_llm.sh`. ```bash cd train/mat/scripts bash train_llm.sh ``` #### Run PRM Learning ```bash cd prm/code \\ single gpu python finetune_qwen_single_gpu.py --model_path $YOUR_MODEL_PATH \ --train_data_path $TRAIN_DATA_PATH \ --test_data_path $TEST_DATA_PATH \\ multi gpu torchrun --nproc_per_node=2 finetune_qwen.py --model_path $YOUR_MODEL_PATH \ --data_path $YOUR_DATA_FOLDER_PATH \ --datasets both \ ``` ## Join Us > Every contribution is valuable to the community. Thank you for your interest in ***OpenR*** ! 🥰 We are deeply committed to the open-source community, and we welcome contributions from everyone. Your efforts, whether big or small, help us grow and improve. Contributions aren’t limited to code—answering questions, helping others, enhancing our documentation, and sharing the project are equally impactful. Feel free to checkout the [contribution guidance](CONTRIBUTING.md) ! ### Future Plan - Add More Comprehensive Evaluations on RL Training and Search Strategies - Scaling the Prove-Verifier Model Size - Support Self-improvement Training <!-- CONTACT --> ## Contact The ***OpenR*** community is maintained by: - **Openreasoner Team** ([email protected]) ## License OpenR is released under the MIT License. ## Citation If you do find our resources helpful, please cite our paper: ``` @misc{wang2024tutorial, author = {Jun Wang}, title = {A Tutorial on LLM Reasoning: Relevant Methods Behind ChatGPT o1}, year = {2024}, url = {https://github.com/openreasoner/openr/blob/main/reports/tutorial.pdf}, note = {Available on GitHub} } ``` ``` @article{wang2024openr, title={OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models}, author={Wang, Jun and Fang, Meng and Wan, Ziyu and Wen, Muning and Zhu, Jiachen and Liu, Anjie and Gong, Ziqin and Song, Yan and Chen, Lei and Ni, Lionel M and others}, journal={arXiv preprint arXiv:2410.09671}, year={2024} } ``` ## Response Examples ### Comparing PRM, Math-psa (Ours) V.S. Math-Shepherd <p align="center"> <img src="./figure/QA/QA1.png" alt="QA 1" width="49%" /> <img src="./figure/QA/QA2.png" alt="QA 2" width="49%" /> </p> ### Justifing RL Training <p align="center"> <img src="./figure/QA/QA3.png" alt="QA 3" width="49%" /> <img src="./figure/QA/QA4.png" alt="QA 4" width="49%" /> </p> ### Exploring Test-time Computation <p align="center"> <img src="./figure/QA/QA5.png" alt="QA 5" width="70%" /> <img src="./figure/QA/QA6.png" alt="QA 6" width="70%" /> <img src="./figure/QA/QA7.png" alt="QA 7" width="70%" /> </p> ## Community **WeChat**: <img src="./figure/wechat_qrcode.jpg" width="30%" /> ## Reference ### Inference-time Computing [1] [Alphazero-like tree-search can guide large language model decoding and training.](https://arxiv.org/pdf/2309.17179) [2] [Reasoning with language model is planning with world model.](https://arxiv.org/pdf/2305.14992) [3] [Scaling LLM test-time compute optimally can be more effective than scaling model parameters](https://arxiv.org/pdf/2408.03314?) [4] [Think before you speak: Training language models with pause tokens](https://arxiv.org/pdf/2310.02226) ### From Outcome Supervision to Process Supervision [1] [Training verifiers to solve math word problems](https://arxiv.org/pdf/2110.14168) [2] [Solving math word problems with process-and outcome-based feedback](https://arxiv.org/pdf/2211.14275) [3] [Let’s verify step by step](https://arxiv.org/pdf/2305.20050) [4] [Making large language models better reasoners with step-aware verifier](https://arxiv.org/pdf/2206.02336) [5] [Ovm, outcome-supervised value models for planning in mathematical reasoning](https://aclanthology.org/2024.findings-naacl.55.pdf) [6] [Generative verifiers: Reward modeling as next-token prediction](https://arxiv.org/pdf/2408.15240) ### Data Acquisition [1] [Star: Bootstrapping reasoning with reasoning](https://proceedings.neurips.cc/paper_files/paper/2022/file/639a9a172c044fbb64175b5fad42e9a5-Paper-Conference.pdf) [2] [Quiet-star: Language models can teach themselves to think before speaking](https://arxiv.org/pdf/2403.09629) [3] [Improve mathematical reasoning in language models by automated process supervision](https://arxiv.org/pdf/2406.06592) [4] [Shepherd: A critic for language model generation](https://arxiv.org/abs/2308.04592) [5] [Math-shepherd: Verify and reinforce llms step-by-step without human annotations](https://aclanthology.org/2024.acl-long.510.pdf) <!-- MARKDOWN LINKS & IMAGES --> <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --> [contributors-shield]: https://img.shields.io/github/contributors/openreasoner/openr.svg?style=for-the-badge [contributors-url]: https://github.com/openreasoner/openr/graphs/contributors [forks-shield]: https://img.shields.io/github/forks/openreasoner/openr.svg?style=for-the-badge [forks-url]: https://github.com/openreasoner/openr/network/members [stars-shield]: https://img.shields.io/github/stars/openreasoner/openr.svg?style=for-the-badge [stars-url]: https://github.com/openreasoner/openr/stargazers [issues-shield]: https://img.shields.io/github/issues/openreasoner/openr.svg?style=for-the-badge [issues-url]: https://github.com/openreasoner/openr/issues [license-shield]: https://img.shields.io/github/license/openreasoner/openr.svg?style=for-the-badge [license-url]: https://github.com/openreasoner/openr/blob/main/LICENSE.txt
{ "source": "openreasoner/openr", "title": "README.md", "url": "https://github.com/openreasoner/openr/blob/main/README.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 19026 }
<div id="top"></div> <!-- *** Thanks for checking out the Best-README-Template. If you have a suggestion *** that would make this better, please fork the repo and create a pull request *** or simply open an issue with the tag "enhancement". *** Don't forget to give the project a star! *** Thanks again! Now go create something AMAZING! :D --> <!-- PROJECT SHIELDS --> <!-- *** I'm using markdown "reference style" links for readability. *** Reference links are enclosed in brackets [ ] instead of parentheses ( ). *** See the bottom of this document for the declaration of the reference variables *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use. *** https://www.markdownguide.org/basic-syntax/#reference-style-links --> <!-- ***[![MIT License][license-shield]][license-url] --> <!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/openreasoner/openr/"> <img src="figure/openr_logo.png" alt="Logo" width="200"> </a> <h1 align="center" style="font-size: 30px;"><strong><em>OpenR</em></strong>: 专注大型语言模型进阶推理能力的开源框架</h1> <p align="center"> <a href="https://arxiv.org/abs/2410.09671">技术报告</a> · <a href="https://github.com/openreasoner/openr/blob/main/reports/Tutorial-LLM-Reasoning-Wang.pdf">指南</a> · <a href="https://github.com/openreasoner/openr">代码库</a> · <a href="https://openreasoner.github.io/">文档</a> · <a href="https://huggingface.co/datasets/openreasoner/MATH-APS">数据集</a> · <a href="https://huggingface.co/openreasoner/Math-psa">模型文件</a> · <a href="https://github.com/openreasoner/openr/issues">问答</a> · <a href="https://www.modelscope.cn/studios/modelscope/OpenR_Inference">推理</a> </p> <p align="center"> [ <a href="https://github.com/openreasoner/openr/blob/main/README.md">English</a> ][ <a href="https://github.com/openreasoner/openr/blob/main/README_zh.md">中文</a> ] </p> </div> --- [![GitHub contributors](https://img.shields.io/github/contributors/openreasoner/openr)][contributors-url] [![arXiv](https://img.shields.io/badge/ArXiv-2410.09671-b31b1b.svg)](https://arxiv.org/pdf/2410.09671) ![GitHub License](https://img.shields.io/github/license/openreasoner/openr) [![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/openreasoner/openr)][issues-url] [![GitHub forks](https://img.shields.io/github/forks/openreasoner/openr)][forks-url] [![GitHub Repo stars](https://img.shields.io/github/stars/openreasoner/openr)][stars-url] [![HuggingFace Dataset](https://img.shields.io/badge/Hugging%20Face-FFD21E?logo=huggingface&logoColor=000)](https://huggingface.co/openreasoner) [![X](https://img.shields.io/badge/openreasoner-%23000000.svg?logo=X&logoColor=white)](https://x.com/openreasoner) [![WeChat](https://img.shields.io/badge/WeChat_Group-07C160?logo=wechat&logoColor=white)](#community) <!-- TABLE OF CONTENTS --> <details> <summary><span style="font-size: 1.5em;"><strong>目录</strong> 📖 </span></summary> <ol> <li><a href="#新闻与更新">新闻与更新</a></li> <li><a href="#功能">功能</a></li> <li><a href="#todo">TODO</a></li> <li><a href="#benchmark">Benchmark</a></li> <li><a href="#图表">图表</a></li> <li><a href="#数据集与模型">数据集与模型</a></li> <li> <a href="#快速入门">快速入门</a> <ul> <li><a href="#安装">安装</a></li> <li><a href="#快速开始">快速开始</a></li> </ul> </li> <li><a href="#用法">用法</a></li> <li><a href="#加入我们">加入我们</a></li> <li><a href="#联系方式">联系方式</a></li> <li><a href="#问答示例">问答示例</a></li> <li><a href="#社区">社区</a></li> <li><a href="#参考引用">参考引用</a></li> </ol> </details> <!-- News and Updates --> ## 新闻与更新 - **[29/11/2024]** 已添加 [**demo**](https://www.modelscope.cn/studios/modelscope/OpenR_Inference) 页面至 *ModelScope*. 感谢 [@wangxingjun778](https://github.com/wangxingjun778) ! - **[24/10/2024]** ***OpenR*** 现已支持 **MCTS** 推理 ([#24](https://github.com/openreasoner/openr/pull/24))! 🌲 - **[15/10/2024]** 我们的报告已发布在 [**Arxiv**](https://arxiv.org/abs/2410.09671) 上! - **[12/10/2024]** ***OpenR*** 已经发布! 🚀 ## 功能 <p align="center"> <img src="./figure/logo_text.png" alt="Description" style="width: 300px; margin-left: 50px; float: right;"> </p> <div style="display: flex; align-items: center;"> <ul style="list-style-type: none; padding: 0;"> <li><strong>✅ 过程监督的数据生成 </strong></li> <li><strong>✅ 在线策略训练 </strong></li> <li><strong>✅ Generative 和 Discriminative 过程奖励模型的训练</strong></li> <li><strong>✅ 多种搜索策略 </strong></li> <li><strong>✅ Test-time 计算和 Scaling Law</strong></li> </ul> </div> | 功能 | 内容 | |-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ✅ 过程监督的数据生成 | - [**OmegaPRM**](https://arxiv.org/abs/2406.06592): Improve Mathematical Reasoning in Language Models by Automated Process Supervision | | ✅ 在线策略训练 | - **强化学习训练**: 使用PRM进行在线RL训练 | | ✅ PRM奖励模型的训练 | - **PRM 训练**: Supervised Training for PRMs<br> - **生成式奖励模型训练**: Direct GenRM | | ✅ 多种搜索策略 | - **Greedy Search**<br> - **Best-of-N**<br> - **Beam Search**<br> - **MCTS**<br> - [**rStar**](https://arxiv.org/pdf/2408.06195v1): Mutual Reasoning Makes Smaller LLMs Stronger Problem-Solvers<br> - **Critic-MCTS** | | ✅ Test-time Computation and Scaling Law | 详见 [benchmark](#benchmark) | ## TODO | 功能 | TODO (<span style="color:red;">高优先级</span>, 欢迎加入开发!) | |-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 👨‍💻数据 | - 复现 [**Journey Learning**](https://arxiv.org/abs/2410.18982) | | 👨‍💻RL训练 | - 分布式训练 <br/>- Reinforcement Fine-Tuning (RFT) [#80](https://github.com/openreasoner/openr/issues/80) | | 👨‍💻PRM | - 更大规模训练<br> - GenRM-CoT 的训练实现 <br/>- Soft-label training [#57](https://github.com/openreasoner/openr/issues/57) | | 👨‍💻推理 | - 优化代码结构 [#53](https://github.com/openreasoner/openr/pull/53) <br> - 添加更多推理任务 (AIME, etc.) [#53](https://github.com/openreasoner/openr/pull/53) <br> - 多模态推理 [#82](https://github.com/openreasoner/openr/issues/82) <br> - 代码生成推理 [#68](https://github.com/openreasoner/openr/pull/68) <br/> - Dots [#75](https://github.com/openreasoner/openr/pull/75) <br/> - 推理精度检查 <br/> - Benchmarking | ## Benchmark 详见 [Benchmark](benchmark) ! ## 图表 <p align="center"> <img src="./figure/compare_prm_by_boN.png" alt="PRM_Results" width="45%" /> <img src="./figure/MATH_subsampled.png" alt="Inference_Results" width="45%" /> </p> ## 数据集与模型 [//]: # ([PRM800K]&#40;https://github.com/openai/prm800k&#41; &#40;Process Supervision Dataset&#41;) [MATH-APS](https://huggingface.co/datasets/mengfang/MATH-APS) (我们发布的数据集) [MATH-psa](https://huggingface.co/openreasoner/Math-psa) (我们发布的过程奖励模型) ## 快速入门 ### 安装 ``` conda create -n open_reasoner python=3.10 conda activate open_reasoner pip install -r requirements.txt pip3 install "fschat[model_worker,webui]" pip install -U pydantic cd envs/MATH/latex2sympy pip install -e . cd - ``` ### 下载基座模型 在运行项目之前,请确保已下载所有所需的基础模型。本项目使用的模型包括: - `Qwen2.5-Math-1.5B-Instruct`, `Qwen2.5-Math-7B-Instruct` - `peiyi9979/mistral-7b-sft` - `peiyi9979/math-shepherd-mistral-7b-prm` Huggingface 具体下载方式可参考 [Huggingface 下载教程](https://huggingface.co/docs/hub/models-downloading) 在继续之前,请确保所有模型已根据项目设置保存在各自的目录中。 ### 快速开始 在运行推理之前,请修改`reason/llm_service/`目录下脚本中的以下变量,以设置适合您使用的基座模型: - `$MODEL_BASE`: 设置为存储模型的目录路径。 - `$POLICY_MODEL_NAME`: 设置为您希望使用的策略模型的名称。 - `$VALUE_MODEL_NAME`: 设置为您希望使用的Value模型的名称。 - `$NUM_LM_WORKER`: 设置为要启动的语言模型(LM)进程的数量 - `$NUM_RM_WORKER`: 设置为要启动的奖励模型(RM)进程的数量。 接下来,我们将使用不同的技术运行推理。 #### 启动 LM 和 RM 服务 例如,要启动 Math Shepherd 模型的 LM 和 RM 服务,请运行以下命令: ```bash sh reason/llm_service/create_service_math_shepherd.sh ``` 关闭服务进程可以参考以下命令: ```bash tmux kill-session -t {Your Session Name} # default is `FastChat` ``` ## 用法 #### 运行 推理(Inference) ⚠️ 确保脚本中的输入参数(`--LM`, `--RM`)与待运行的进程中的变量(`$POLICY_MODEL_NAME`, `$VALUE_MODEL_NAME`)保持一致! ```bash export PYTHONPATH=$(pwd) sh scripts/eval/cot_greedy.sh # Method: cot. Average result: ({'majority_vote': 0.734, 'total_completion_tokens': 559.13},) sh scripts/eval/cot_rerank.sh # Method: best_of_n. Average result: ({'majority_vote': 0.782, # 'prm_min_max': 0.772, # 'prm_min_vote': 0.792, # 'prm_last_max': 0.776, # 'prm_last_vote': 0.792, # 'total_completion_tokens': 4431.268},) sh scripts/eval/beam_search.sh # Method: beam_search. Average result: ({'majority_vote': 0.74, 'total_completion_tokens': 2350.492},) sh scripts/eval/vanila_mcts.sh ``` #### 运行 训练(Training) ⚠️ 运行训练之前,请修改 `train/mat/scripts/train_llm.sh` 文件中的 `$dataset_path`, `$model_name_or_path` 和 `$prm_name_or_path` 项。 ```bash cd train/mat/scripts bash train_llm.sh ``` #### 运行 PRM学习 ```bash cd prm/code \\ single gpu python finetune_qwen_single_gpu.py --model_path $YOUR_MODEL_PATH \ --train_data_path $TRAIN_DATA_PATH \ --test_data_path $TEST_DATA_PATH \\ multi gpu torchrun --nproc_per_node=2 finetune_qwen.py --model_path $YOUR_MODEL_PATH \ --data_path $YOUR_DATA_FOLDER_PATH \ --datasets both \ ``` ## 加入我们 > 您的每一份贡献对社区来说都是宝贵的。 感谢您对 ***OpenR*** 的关注!🥰 我们致力于发展开源社区,并十分欢迎大家的contribution。无论大小,您的努力都将帮助我们成长和进步。贡献不仅限于代码——解答问题、帮助他人、改进我们的文档、分享项目同样具有深远的影响。 欢迎查阅 [贡献指南](CONTRIBUTING.md) ! ### 未来计划 - 更全面的强化学习训练和搜索方法的实验 - 更大规模的Prove-Verifier模型 - 支持自我提升训练功能 <!-- CONTACT --> ## 联系方式 ***OpenR*** 社区由以下团队维护: - **Openreasoner Team** ([email protected]) ## License ***OpenR*** is released under the MIT License. ## 欢迎引用 如果您觉得我们的资源对您有帮助,请引用我们的论文: ``` @article{wang2024openr, title={OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models}, author={Wang, Jun and Fang, Meng and Wan, Ziyu and Wen, Muning and Zhu, Jiachen and Liu, Anjie and Gong, Ziqin and Song, Yan and Chen, Lei and Ni, Lionel M and others}, journal={arXiv preprint arXiv:2410.09671}, year={2024} } ``` 十分感谢! ## 问答示例 ### 对比 过程奖励模型(PRM):Math-psa (Ours) V.S. Math-Shepherd <p align="center"> <img src="./figure/QA/QA1.png" alt="QA 1" width="49%" /> <img src="./figure/QA/QA2.png" alt="QA 2" width="49%" /> </p> ### 验证强化学习训练 (RL Training) <p align="center"> <img src="./figure/QA/QA3.png" alt="QA 3" width="49%" /> <img src="./figure/QA/QA4.png" alt="QA 4" width="49%" /> </p> ### 探索 Test-time Computation <p align="center"> <img src="./figure/QA/QA5.png" alt="QA 5" width="70%" /> <img src="./figure/QA/QA6.png" alt="QA 6" width="70%" /> <img src="./figure/QA/QA7.png" alt="QA 7" width="70%" /> </p> ## 社区 **微信群聊**: <img src="./figure/wechat_qrcode.jpg" width="30%" /> ## 参考引用 ### Inference-time Computing [1] [Alphazero-like tree-search can guide large language model decoding and training.](https://arxiv.org/pdf/2309.17179) [2] [Reasoning with language model is planning with world model.](https://arxiv.org/pdf/2305.14992) [3] [Scaling LLM test-time compute optimally can be more effective than scaling model parameters](https://arxiv.org/pdf/2408.03314?) [4] [Think before you speak: Training language models with pause tokens](https://arxiv.org/pdf/2310.02226) ### From Outcome Supervision to Process Supervision [1] [Training verifiers to solve math word problems](https://arxiv.org/pdf/2110.14168) [2] [Solving math word problems with process-and outcome-based feedback](https://arxiv.org/pdf/2211.14275) [3] [Let’s verify step by step](https://arxiv.org/pdf/2305.20050) [4] [Making large language models better reasoners with step-aware verifier](https://arxiv.org/pdf/2206.02336) [5] [Ovm, outcome-supervised value models for planning in mathematical reasoning](https://aclanthology.org/2024.findings-naacl.55.pdf) [6] [Generative verifiers: Reward modeling as next-token prediction](https://arxiv.org/pdf/2408.15240) ### Data Acquisition [1] [Star: Bootstrapping reasoning with reasoning](https://proceedings.neurips.cc/paper_files/paper/2022/file/639a9a172c044fbb64175b5fad42e9a5-Paper-Conference.pdf) [2] [Quiet-star: Language models can teach themselves to think before speaking](https://arxiv.org/pdf/2403.09629) [3] [Improve mathematical reasoning in language models by automated process supervision](https://arxiv.org/pdf/2406.06592) [4] [Shepherd: A critic for language model generation](https://arxiv.org/abs/2308.04592) [5] [Math-shepherd: Verify and reinforce llms step-by-step without human annotations](https://aclanthology.org/2024.acl-long.510.pdf) <!-- MARKDOWN LINKS & IMAGES --> <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --> [contributors-shield]: https://img.shields.io/github/contributors/openreasoner/openr.svg?style=for-the-badge [contributors-url]: https://github.com/openreasoner/openr/graphs/contributors [forks-shield]: https://img.shields.io/github/forks/openreasoner/openr.svg?style=for-the-badge [forks-url]: https://github.com/openreasoner/openr/network/members [stars-shield]: https://img.shields.io/github/stars/openreasoner/openr.svg?style=for-the-badge [stars-url]: https://github.com/openreasoner/openr/stargazers [issues-shield]: https://img.shields.io/github/issues/openreasoner/openr.svg?style=for-the-badge [issues-url]: https://github.com/openreasoner/openr/issues [license-shield]: https://img.shields.io/github/license/openreasoner/openr.svg?style=for-the-badge [license-url]: https://github.com/openreasoner/openr/blob/main/LICENSE.txt
{ "source": "openreasoner/openr", "title": "README_zh.md", "url": "https://github.com/openreasoner/openr/blob/main/README_zh.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 16193 }
## ***OpenR*** Benchmark Results Here we present some preliminary results in the following tables. <table> <thead> <tr> <th>Generator</th> <th>Reward Model</th> <th>Search</th> <th>Budget</th> <th>MATH</th> </tr> </thead> <tbody> <tr> <td rowspan="15" style="text-align: center; vertical-align: middle;"> <img src="https://avatars.githubusercontent.com/u/141221163?s=200&v=4" alt="Qwen2.5 Logo" style="width: 50px; height: 50px;" align="center"><br> Qwen2.5-Math-1.5B-Instruct </td> <td rowspan="5">Math-Sphered-Mistral-7B-PRM</td> <td>Greedy</td> <td>$2^0$</td> <td></td> </tr> <tr> <td>Majority Vote</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Best-of-N</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Beam Search</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>MCTS</td> <td>$2^6$</td> <td></td> </tr> <tr> <td rowspan="5">Math-psa-7B</td> <td>Greedy</td> <td>$2^0$</td> <td></td> </tr> <tr> <td>Majority Vote</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Best-of-N</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Beam Search</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>MCTS</td> <td>$2^6$</td> <td></td> </tr> <tr> <td rowspan="5">Skywork-o1-PRM-7B</td> <td>Greedy</td> <td>$2^0$</td> <td></td> </tr> <tr> <td>Majority Vote</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Best-of-N</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Beam Search</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>MCTS</td> <td>$2^6$</td> <td></td> </tr> <td></td> <tr> <td rowspan="15" style="text-align: center; vertical-align: middle;"> <img src="https://avatars.githubusercontent.com/u/141221163?s=200&v=4" alt="Qwen2.5 Logo" style="width: 50px; height: 50px;" align="center"><br> Qwen2.5-Math-7B-Instruct </td> <td rowspan="5">Math-Sphered-Mistral-7B-PRM</td> <td>Greedy</td> <td>$2^0$</td> <td></td> </tr> <tr> <td>Majority Vote</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Best-of-N</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Beam Search</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>MCTS</td> <td>$2^6$</td> <td></td> </tr> <tr> <td rowspan="5">Math-psa-7B</td> <td>Greedy</td> <td>$2^0$</td> <td></td> </tr> <tr> <td>Majority Vote</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Best-of-N</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Beam Search</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>MCTS</td> <td>$2^6$</td> <td></td> </tr> <tr> <td rowspan="5">Skywork-o1-PRM-7B</td> <td>Greedy</td> <td>$2^0$</td> <td></td> </tr> <tr> <td>Majority Vote</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Best-of-N</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Beam Search</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>MCTS</td> <td>$2^6$</td> <td></td> </tr> <td></td> <tr> <td rowspan="15" style="text-align: center; vertical-align: middle;"> <img src="https://cdn-avatars.huggingface.co/v1/production/uploads/652260e0728c0b6dc72dd957/lPyWi7-XFLhH3s1c2vnvD.png" alt="Skywork Logo" style="width: 50px; height: 50px;" align="center"><br> Skywork-o1-Open-Llama-3.1-8B </td> <td rowspan="5">Math-Sphered-Mistral-7B-PRM</td> <td>Greedy</td> <td>$2^0$</td> <td></td> </tr> <tr> <td>Majority Vote</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Best-of-N</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Beam Search</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>MCTS</td> <td>$2^6$</td> <td></td> </tr> <tr> <td rowspan="5">Math-psa-7B</td> <td>Greedy</td> <td>$2^0$</td> <td></td> </tr> <tr> <td>Majority Vote</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Best-of-N</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Beam Search</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>MCTS</td> <td>$2^6$</td> <td></td> </tr> <tr> <td rowspan="5">Skywork-o1-PRM-7B</td> <td>Greedy</td> <td>$2^0$</td> <td></td> </tr> <tr> <td>Majority Vote</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Best-of-N</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>Beam Search</td> <td>$2^6$</td> <td></td> </tr> <tr> <td>MCTS</td> <td>$2^6$</td> <td></td> </tr> </tbody> </table>
{ "source": "openreasoner/openr", "title": "benchmark/tables.md", "url": "https://github.com/openreasoner/openr/blob/main/benchmark/tables.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 5239 }
# Open O1 dev A simple implementation of data generation of [Improve Mathematical Reasoning in Language Models by Automated Process Supervision](https://arxiv.org/pdf/2406.06592) ## Generating data Edit the `config.yaml` file to set the model and other parameters. Input json file should be a list of problems and answers with key `problem` and `final_answer`. ```yaml input: json_file_path: 'extracted_problems_and_answers.json' output: file_prefix: 'math' log_file_path: 'processing_log.log' processing: initial_rollouts: 20 num_rollouts: 20 max_iterations: 100 model: # supported model_types: "hf", "openai", "anthropic" model_type: "hf" model_name: "Qwen/Qwen2.5-Math-7B-Instruct" model_args: max_tokens: 200 temperature_range: [0.7, 1.0] ``` ```bash python gen_data.py ``` ## Data Download the [**MATH dataset**](https://people.eecs.berkeley.edu/~hendrycks/MATH.tar) here.
{ "source": "openreasoner/openr", "title": "data/README.md", "url": "https://github.com/openreasoner/openr/blob/main/data/README.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 916 }
# Open O1 dev ## Environment ``` conda create -n open_reasoner python=3.10 conda activate open_reasoner pip install -r requirements.txt pip3 install "fschat[model_worker,webui]" ``` ## Running `export PYTHONPATH=$(pwd)` ### Start LM & RM Services Set `NUM_LM_WORKER` and `NUM_RM_WORKER`, as well as the model_path config, in `reason/llm_service/create_service_math_shepherd.sh` ``` sh reason/llm_service/create_service_math_shepherd.sh ``` ### Run Inference ``` export PYTHONPATH=$(pwd) sh scripts/eval/cot_greedy.sh sh scripts/eval/cot_rerank.sh sh scripts/eval/beam_search.sh ``` ### Run Experiment for me @(anjie) see `scripts/eval/exp/`, run scripts in it.
{ "source": "openreasoner/openr", "title": "reason/README.md", "url": "https://github.com/openreasoner/openr/blob/main/reason/README.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 666 }
## How to run Step 1: cd mat/scripts Step 2: modify the dataset_path, model_name_or_path and prm_name_or_path in train_llm.sh Step 3: bash train_llm.sh
{ "source": "openreasoner/openr", "title": "train/README.md", "url": "https://github.com/openreasoner/openr/blob/main/train/README.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 153 }
# OmegaPRM Multi-GPU Runner This script runs `OmegaPRM` on multiple GPUs, with each GPU handling a different part of the dataset for parallel processing. ## Steps to Use 1. **Split the Input Data** Use `process_json.py` to split your input JSON file into multiple parts for each GPU: ```bash python process_json.py --input_file questions.json --output_dir output_directory --num_splits 8 ``` 2. **Run the Script** Use `run_omegaprm_multi_gpu.sh` to start processing with OmegaPRM on each GPU: ``` bash run_omegaprm_multi_gpu.sh ``` Results are saved in `output_results`. **Note**: Before running, make sure to set the correct values for parameters in the script. Important parameters include: -`MODEL_NAME`: Path to the model (e.g., Hugging Face or vLLM model). -`MODEL_TYPE`: Set to "hf" for Hugging Face or "vllm" for vLLM support. -`Other parameters` like `MAX_NEW_TOKENS`, `TEMPERATURE`, `TOP_K`, and other hyperparameters according to your needs. ## Run on a Single GPU ```bash CUDA_VISIBLE_DEVICES=0 python run_omegaprm.py \ --question_file ../extracted_problems_and_answers.json \ --output_dir output_results \ --model_name "Your model name or path " \ --model_type $MODEL_TYPE \ --device "cuda" \ --max_new_tokens 2048 \ --temperature 0.7 \ --top_k 30 \ --top_p 0.9 \ --c_puct 0.125 \ --alpha 0.5 \ --beta 0.9 \ --length_scale 500 \ --num_rollouts 16 \ --max_search_count 20 \ --rollout_budget 200 \ --save_data_tree True\ --log_file_prefix "log/omega_prm_single_gpu" ``` # Generated Data Format For data generated by `OmegaPRM_v2`, two formats are available: 1. Flat Format (`save_data_tree=False`): Each entry is structured as: { "solution_prefix": [Q, x_1:x_i], "mc_value": 0.5 } where `i` is a variable representing the number of reasoning steps. This format provides a linear view of the reasoning process without hierarchical structure. 2. Tree Format (`save_data_tree=True`): In this format, data is organized as a tree structure, aligned with the figure presented in the paper. Each reasoning step (or node) includes: - text: The cumulative reasoning from the root node up to this specific step. - mc_value: The Monte Carlo score computed for the reasoning progression up to this step. - children: A list of child nodes branching from the current node.
{ "source": "openreasoner/openr", "title": "data/omegaPRM_v2/readme.md", "url": "https://github.com/openreasoner/openr/blob/main/data/omegaPRM_v2/readme.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 2479 }
## Re-implementing rStar MCTS Original Paper: [Mutual Reasoning Makes Smaller LLMs Stronger Problem-Solvers](https://arxiv.org/abs/2408.06195) Original Repo: [https://github.com/zhentingqi/rStar](https://github.com/zhentingqi/rStar) For the current version of rStar, we use a separated environment `rstar_env.py`. In the future, we hope to rewrite it in a better way. For inference, set up your LLM and RM, then run `scripts/rstar_mcts.sh`.
{ "source": "openreasoner/openr", "title": "envs/rstar/README.md", "url": "https://github.com/openreasoner/openr/blob/main/envs/rstar/README.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 443 }
# Deploy LMs and RMs via FastChat The code about model workers are adapted from [FastChat official repo](https://github.com/lm-sys/FastChat). ## Requirements ``` pip3 install "fschat[model_worker,webui]" sudo apt install -y tmux ``` ## Examples For example run Qwen2.5-Math LMs and PRMs we trained. Set `NUM_LM_WORKER` and `NUM_RM_WORKER`, as well as the model_path config, see details in `create_service_qwen2.5_math_vllm.sh` ``` sh reason/llm_service/create_service_qwen2.5_math_vllm.sh ```
{ "source": "openreasoner/openr", "title": "reason/llm_service/README.md", "url": "https://github.com/openreasoner/openr/blob/main/reason/llm_service/README.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 492 }
![Logo](https://picgo-1258602555.cos.ap-nanjing.myqcloud.com/icon.png) # [latex2sympy2](https://github.com/OrangeX4/latex2sympy) ## About `latex2sympy2` parses **LaTeX math expressions** and converts it into the equivalent **SymPy form**. The latex2sympy2 is adapted from [augustt198/latex2sympy](https://github.com/augustt198/latex2sympy) and [purdue-tlt / latex2sympy](https://github.com/purdue-tlt/latex2sympy). This project is a part of a VS Code extension called [Latex Sympy Calculator](https://marketplace.visualstudio.com/items?itemName=OrangeX4.latex-sympy-calculator). It is designed for providing people writing in latex or markdown a ability to calculate something when writing math expression. [ANTLR](http://www.antlr.org/) is used to generate the parser. ## Features * **Arithmetic:** Add (+), Sub (-), Dot Mul (·), Cross Mul (×), Frac (/), Power (^), Abs (|x|), Sqrt (√), etc... * **Alphabet:** a - z, A - Z, α - ω, Subscript (x_1), Accent Bar(ā), etc... * **Common Functions:** gcd, lcm, floor, ceil, max, min, log, ln, exp, sin, cos, tan, csc, sec, cot, arcsin, sinh, arsinh, etc... * **Funcion Symbol:** f(x), f(x-1,), g(x,y), etc... * **Calculous:** Limit ($lim_{n\to\infty}$), Derivation ($\frac{d}{dx}(x^2+x)$), Integration ($\int xdx$), etc... * **Linear Algebra:** Matrix, Determinant, Transpose, Inverse, Elementary Transformation, etc... * **Other:** Binomial... **NOTICE:** It will do some irreversible calculations when converting determinants, transposed matrixes and elementary transformations... ## Installation ``` pip install latex2sympy2 ``` **Requirements:** `sympy` and `antlr4-python3-runtime` packages. ## Usage ### Basic In Python: ```python from latex2sympy2 import latex2sympy, latex2latex tex = r"\frac{d}{dx}(x^{2}+x)" # Or you can use '\mathrm{d}' to replace 'd' latex2sympy(tex) # => "Derivative(x**2 + x, x)" latex2latex(tex) # => "2 x + 1" ``` ### Examples |LaTeX|Converted SymPy|Calculated Latex| |-----|-----|---------------| |`x^{3}` $x^{3}$| `x**3`|`x^{3}` $x^{3}$| |`\frac{d}{dx} tx` $\frac{d}{dx}tx$|`Derivative(x*t, x)`|`t` $t$| |`\sum_{i = 1}^{n} i` $\sum_{i = 1}^{n} i$|`Sum(i, (i, 1, n))`|`\frac{n \left(n + 1\right)}{2}` $\frac{n \left(n + 1\right)}{2}$| |`\int_{a}^{b} \frac{dt}{t}`|`Integral(1/t, (t, a, b))`|`-\log{(a)} + \log{(b)}` $-\log{(a)} + \log{(b)}$| |`(2x^3 - x + z)|_{x=3}` $(2x^3 - x + z)\|_{x=3}$|`z + 51`| `z + 51` $z + 51$ | If you want to read the math formula, you can click [GitNotes](https://notes.orangex4.cool/?git=github&github=OrangeX4/latex2sympy). ### Solve Equation ``` latex # Before x + y = 1 # After [ y = 1 - x, \ x = 1 - y] ``` ### Eval At ``` latex # Before (x+2)|_{x=y+1} # After y + 3 ``` ### Matrix #### Identity matrix ``` tex = r"\bm{I}_3" latex2sympy(tex) # => "Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]])" ``` #### Determinant ``` python from latex2sympy2 import latex2sympy tex = r"\begin{vmatrix} x & 0 & 0 \\ 0 & x & 0 \\ 0 & 0 & x \end{vmatrix}" latex2sympy(tex) # => "x^{3}" ``` #### Transpose ``` python from latex2sympy2 import latex2sympy tex = r"\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}^T" # Or you can use "\begin{pmatrix}1&2&3\\4&5&6\\7&8&9\end{pmatrix}'" latex2sympy(tex) # => "Matrix([[1, 4, 7], [2, 5, 8], [3, 6, 9]])" ``` #### Elementary Transformation ``` python from latex2sympy2 import latex2sympy matrix = r''' \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \\ \end{pmatrix} ''' # Scale the row with grammar "\xrightarrow{kr_n}" tex = matrix + r'\xrightarrow{3r_1}' latex2sympy(tex) # => "Matrix([[3, 6, 9], [4, 5, 6], [7, 8, 9]])" # Swap the cols with grammar "\xrightarrow{c_1<=>c_2}" # Of course, you can use "\leftrightarrow" to replace "<=>" tex = matrix + r'\xrightarrow{c_1<=>c_2}' latex2sympy(tex) # => "Matrix([[2, 1, 3], [5, 4, 6], [8, 7, 9]])" # Scale the second row and add it to the first row # with grammar "\xrightarrow{r_1+kr_2}" tex = matrix + r'\xrightarrow{r_1+kr_2}' latex2sympy(tex) # => "Matrix([[4*k + 1, 5*k + 2, 6*k + 3], [4, 5, 6], [7, 8, 9]])" # You can compose the transform with comma "," # and grammar "\xrightarrow[4r_3]{2r_1, 3r_2}" # Remember the priority of "{}" is higher than "[]" tex = matrix + r'\xrightarrow[4r_3]{2r_1, 3r_2}' latex2sympy(tex) # => "Matrix([[2, 4, 6], [12, 15, 18], [28, 32, 36]])" ``` ### Variances ``` python from latex2sympy2 import latex2sympy, variances, var, set_variances # Assign x a value of 1 latex2sympy(r"x = 1") # Assign x a matrix symbol with dimension of n x m latex2sympy(r"x \in \mathbb{R}^{n \times m}") # Calculate x + y latex2sympy(r"x + y") # => "y + 1" # Get all variances print(variances) # => "{x: 1}" # Get variance of "x" print(var["x"]) # => "1" # Reset all variances set_variances({}) latex2sympy(r"x + y") # => "x + y" ``` ### Complex Number Support ``` python from latex2sympy2 import set_real set_real(False) ``` ## Contributing If you want to add a new grammar, you can fork the code from [OrangeX4/latex2sympy](https://github.com/OrangeX4/latex2sympy). * To modify parser grammar, view the existing structure in `PS.g4`. * To modify the action associated with each grammar, look into `latex2sympy.py`. Contributors are welcome! Feel free to open a pull request or an issue.
{ "source": "openreasoner/openr", "title": "envs/MATH/latex2sympy/README.md", "url": "https://github.com/openreasoner/openr/blob/main/envs/MATH/latex2sympy/README.md", "date": "2024-10-11T02:51:36", "stars": 1673, "description": "OpenR: An Open Source Framework for Advanced Reasoning with Large Language Models", "file_size": 5301 }