
Furthermore I'm using the ArduinoBLE package to provide a BLE Server that let's you control the motor.
- motorControlService:
c10e3e56-fdd3-11eb-9a03-0242ac130003 - motorCharacteristic:
35a1022c-fdd3-11eb-9a03-0242ac130003
| This is en example conversation with Gemma2 2B. | |
| The problem here is that after the first function call, the LLM should have all the necessary information to answer the initial quary. | |
| But it still decides to call the function again. So its stuck in a function-call loop.. | |
| ----------------- | |
| SYSTEM PROMPT | |
| ----------------- | |
| You are K.I.T.T. from Knight Rider, a speaking car that talks with Nico. So direct your answers directly to Nico in 2nd person. Keep your answers short. |
| class MyClass extends EventTarget { | |
| private _value: number = 0; | |
| set value(value: number) { | |
| this._value = value; | |
| this.dispatchEvent(new Event('valueChanged')); | |
| } | |
| get value(): number { | |
| return this._value; |
| // requires the experimental v3 of transformersJS: | |
| // npm install xenova/transformers.js#v3 | |
| import { FeatureExtractionPipeline, pipeline } from "@xenova/transformers"; | |
| export interface Entry<T> { | |
| str: string; | |
| metadata: T; | |
| } | |
| export interface VectorizedEntry<T> extends Entry<T> { |

Furthermore I'm using the ArduinoBLE package to provide a BLE Server that let's you control the motor.
c10e3e56-fdd3-11eb-9a03-0242ac13000335a1022c-fdd3-11eb-9a03-0242ac130003| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import { | |
| SharedStorageProvider, | |
| useSharedStorage, | |
| } from './sharedStateContext.tsx'; | |
| const App = () => { | |
| const [sharedState, setSharedState] = useSharedStorage(); |
| import React from 'react'; | |
| import { MyContextProvider, useMyContext } from './myContext'; | |
| const CompOne = () => { | |
| const [myState, setMyState] = useMyContext(); | |
| return ( | |
| <div> | |
| <p> | |
| CompOne update:{' '} | |
| <button onClick={() => setMyState({ ...myState, foo: 'baz' })}> |
| // ./PostList.jsx | |
| import React from 'react'; | |
| import {apiStates, useApi} from './useApi.jsx' | |
| const PostList = () => { | |
| const { state, error, data, reload } = useApi('https://api.mysite.com'); | |
| switch (state) { | |
| case apiStates.ERROR: | |
| return ( |
| <?php | |
| namespace SayHello\Theme\Package; | |
| /** | |
| * @author Nico Martin <[email protected]> | |
| */ | |
| class Polylang | |
| { | |
| public $translatedNames = []; |
| const {TextControl, IconButton} = wp.components; | |
| const {InnerBlocks} = wp.editor; | |
| const {__} = wp.i18n; | |
| const {dispatch} = wp.data; | |
| const {createBlock, registerBlockType} = wp.blocks; | |
| registerBlockType('prefix/container', { | |
| title: 'Container', | |
| icon: 'category', | |
| category: 'category', |
| (function (blocks, components, element) { | |
| blocks.registerBlockType('test/ssr', { | |
| title: 'Server Side Rendered Block', | |
| icon: 'admin-site-alt3', | |
| category: 'test', | |
| edit: function (props) { | |
| return element.createElement(components.ServerSideRender, {block: 'test/ssr'}); | |
| }, | |
| save: function () { | |
| return null; |