jondurbin commited on
Commit
911bc32
·
verified ·
1 Parent(s): c5a8f7e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -149
README.md CHANGED
@@ -755,155 +755,6 @@ print(tokenizer.apply_chat_template(chat, tokenize=False))
755
  ```
756
  </details>
757
 
758
- <details>
759
- <summary>
760
- <b>Inline character actions/function calling</b>
761
- <br>
762
- Allow characters to interact with their environments via function calling.
763
- </summary>
764
-
765
- I recently generated an action dataset in the style of Glaive function calling dataset, but meant specifically for characters: https://huggingface.co/datasets/jondurbin/cinematika-v0.1/blob/main/actions.parquet
766
-
767
- To use this, you will need to update your character card to include "objects_available" as a list of key/value pairs, as well as a "functions" list.
768
-
769
- The objects should be similar to:
770
- ```json
771
- {
772
- "objects_available": [
773
- {
774
- "name": "laptop",
775
- "description": "a high-end laptop with custom hardware and software",
776
- "location": "on the desk in her secret hideout"
777
- },
778
- {
779
- "name": "encryption key",
780
- "description": "a USB drive containing powerful encryption algorithms",
781
- "location": "hidden in a false bottom of her backpack"
782
- },
783
- {
784
- "name": "scanner",
785
- "description": "a compact device used for intercepting and decoding wireless signals",
786
- "location": "clipped to her belt, always within reach"
787
- },
788
- {
789
- "name": "VR headset",
790
- "description": "a virtual reality headset used for immersive hacking and data visualization",
791
- "location": "hanging on a hook near her computer setup"
792
- },
793
- {
794
- "name": "energy drink",
795
- "description": "a can of her favorite energy drink, always on hand for long hacking sessions",
796
- "location": "next to her laptop, ready to be opened"
797
- }
798
- ]
799
- }
800
- ```
801
-
802
- And the functions:
803
- ```
804
- {
805
- "functions": [
806
- {
807
- "name": "move_to",
808
- "description": "move to a specified location",
809
- "parameters": {
810
- "location": {
811
- "type": "string",
812
- "description": "the location to move to"
813
- }
814
- }
815
- },
816
- {
817
- "name": "pick_up",
818
- "description": "pick up an object",
819
- "parameters": {
820
- "object": {
821
- "type": "string",
822
- "description": "the object to pick up"
823
- }
824
- }
825
- },
826
- {
827
- "name": "put_down",
828
- "description": "put down an object",
829
- "parameters": {
830
- "object": {
831
- "type": "string",
832
- "description": "the object to put down"
833
- },
834
- "location": {
835
- "type": "string",
836
- "description": "the location to put the object down"
837
- }
838
- }
839
- },
840
- {
841
- "name": "hack",
842
- "description": "attempt to hack into a computer system",
843
- "parameters": {
844
- "system": {
845
- "type": "string",
846
- "description": "the computer system to hack"
847
- }
848
- }
849
- },
850
- {
851
- "name": "decode",
852
- "description": "decode an encrypted message or file",
853
- "parameters": {
854
- "message": {
855
- "type": "string",
856
- "description": "the encrypted message or file to decode"
857
- }
858
- }
859
- },
860
- {
861
- "name": "scan",
862
- "description": "scan for wireless signals and network vulnerabilities",
863
- "parameters": {}
864
- },
865
- {
866
- "name": "analyze",
867
- "description": "analyze data for patterns and anomalies",
868
- "parameters": {
869
- "data": {
870
- "type": "string",
871
- "description": "the data to analyze"
872
- }
873
- }
874
- },
875
- {
876
- "name": "hide",
877
- "description": "quickly hide to avoid detection",
878
- "parameters": {
879
- "location": {
880
- "type": "string",
881
- "description": "the location to hide"
882
- }
883
- }
884
- }
885
- ]
886
- }
887
- ```
888
-
889
- This just becomes part of your character card/system prompt. Then, when you chat with the character and illicit a response that would make use of objects/functions/actions, it should be included as such:
890
-
891
- ```
892
- prompt: I've heard rumors about a major corporation with a hidden agenda. Do you think you could hack into their system and find out what they're up to?
893
- response: I've had my suspicions about them for a while now. Let me see what I can uncover.
894
- <|begin_func|>{"name": "move_to", "parameters": {"location": "the desk in her secret hideout"}}<|end_func|>
895
- <|begin_func|>{"name": "pick_up", "parameters": {"object": "laptop"}}<|end_func|>
896
- Time to put my skills to the test.
897
- <|begin_func|>{"name": "hack", "parameters": {"system": "Megacorp X's mainframe"}}<|end_func|>
898
- Their firewalls are tough, but not unbreakable. I'm in. Let's see what secrets they're hiding...
899
- <|begin_func|>{"name": "analyze", "parameters": {"data": "encrypted files"}}<|end_func|>
900
- Interesting. It looks like they've been conducting illegal experiments and covering up the evidence.
901
- I'll need to dig deeper to find the proof.
902
- ```
903
-
904
- Experiment, and find out what works and doesn't.
905
- </details>
906
-
907
  ## Renting instances to run the model
908
 
909
  ### Massed Compute Virtual Machine
 
755
  ```
756
  </details>
757
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
758
  ## Renting instances to run the model
759
 
760
  ### Massed Compute Virtual Machine