You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/output/markdown/commands.md
+26-8Lines changed: 26 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,7 +252,9 @@ This command Enriches every molecule in your current working list of molecules w
252
252
- RXN Toolkit `predict Reaction` <br>
253
253
- RXN Toolkit `predict retrosynthesis ` <br>
254
254
- DS4SD Toolkit `search for patents containing molecule` <br>
255
-
- DS4SD Toolkit `search for similiar molecules` <br><br>
255
+
- DS4SD Toolkit `search for similiar molecules` <br>
256
+
257
+
See the Deep Search toolkit and RXN toolkit help for further assistance on these commands. <br><br>
256
258
257
259
`clear analysis cache`{: .cmd }
258
260
this command clears the cache of analysis results for your current workspace. <br><br>
@@ -466,11 +468,26 @@ List all available commands. <br><br>
466
468
467
469
### Model
468
470
471
+
`model auth list`{: .cmd }
472
+
show authentication group mapping <br><br>
473
+
474
+
`model auth add group '<auth_group>' with '<api_key>'`{: .cmd }
475
+
add an authentication group for model services to use <br><br>
476
+
477
+
`model auth remove group '<auth_group>'`{: .cmd }
478
+
remove an authentication group <br><br>
479
+
480
+
`model auth add service '<service_name>' to group '<auth_group>'`{: .cmd }
481
+
attach an authentication group to a model service <br><br>
482
+
483
+
`model auth remove service '<service_name>'`{: .cmd }
484
+
detatch an authentication group from a model service <br><br>
485
+
469
486
`model service status`{: .cmd }
470
487
get the status of currently cataloged services <br><br>
471
488
472
-
`model service config '<service_name>'|<service_name>`{: .cmd }
473
-
get the config of a service <br><br>
489
+
`model service describe '<service_name>'|<service_name>`{: .cmd }
490
+
get the configuration of a service <br><br>
474
491
475
492
`model catalog list`{: .cmd }
476
493
get the list of currently cataloged services <br><br>
@@ -481,8 +498,9 @@ uncatalog a model service <br>
481
498
Example: <br>
482
499
`uncatalog model service 'gen'` <br><br>
483
500
484
-
`catalog model service from (remote) '<path or github>' as '<service_name>'|<service_name>`{: .cmd }
501
+
`catalog model service from (remote) '<path or github>' as '<service_name>'|<service_name> USING (<parameter>=<value> <parameter>=<value>)`{: .cmd }
485
502
catalog a model service from a path or github or remotely from an existing OpenAD service. <br>
503
+
(USING) optional headers parameters for communication with service backend. <br>
486
504
487
505
Example: <br>
488
506
@@ -679,7 +697,7 @@ Lists all RXN AI models currently available. <br><br>
679
697
`predict retrosynthesis '<smiles>' [ using (option1=<value> option2=<value>) ]`{: .cmd }
680
698
Perform a retrosynthesis route prediction on a molecule. <br>
681
699
682
-
Options for the optional`using` clause: <br>
700
+
Optional Parameters that can be specified in the`using` clause: <br>
683
701
-`availability_pricing_threshold=<int>` Maximum price in USD per g/ml of compounds. Default: no threshold. <br>
684
702
-`available_smiles='<smiles>.<smiles>.<smiles>'` List of molecules available as precursors, delimited with a period. <br>
685
703
-`exclude_smiles='<smiles>.<smiles>.<smiles>'` List of molecules to exlude from the set of precursors, delimited with a period. <br>
@@ -703,7 +721,7 @@ Run a batch of reaction predictions. The provided list of reactions can be speci
703
721
704
722
Reactions are defined by combining two SMILES strings delimited by a period. For example: `'BrBr.c1ccc2cc3ccccc3cc2c1'` <br>
705
723
706
-
Options for the optional`using` clause: <br>
724
+
Optional Parameters that can be specified in the`using` clause: <br>
707
725
-`ai_model='<model_name>'` What model to use. Use the command `list rxn models` to list all available models. The default is '2020-07-01'. <br>
708
726
709
727
You can reuse previously generated results by appending the optional `use_saved` clause. This will reuse the results of a previously run command with the same parameters, if available. <br>
@@ -717,7 +735,7 @@ Predict the reaction between two molecules. <br>
717
735
718
736
Reactions are defined by combining two SMILES strings delimited by a period. For example: `'BrBr.c1ccc2cc3ccccc3cc2c1'` <br>
719
737
720
-
Options for the optional`using` clause: <br>
738
+
Optional Parameters that can be specified in the`using` clause: <br>
721
739
-`ai_model='<model_name>'` What model to use. Use the command `list rxn models` to list all available models. The default is '2020-07-01'. <br>
722
740
723
741
You can reuse previously generated results by appending the optional `use_saved` clause. This will reuse the results of a previously run command with the same parameters, if available. <br>
@@ -731,7 +749,7 @@ Run a batch of reaction predictions for topn. The provided list of reactions can
731
749
732
750
Reactions are defined by combining two SMILES strings delimited by a period. For example: `'BrBr.c1ccc2cc3ccccc3cc2c1'` <br>
733
751
734
-
Options for the optional`using` clause: <br>
752
+
Optional Parameters that can be specified in the`using` clause: <br>
735
753
-`ai_model='<model_name>'` What model to use. Use the command `list rxn models` to list all available models. The default is '2020-07-01'. <br>
736
754
-`topn=<integer>` Defined the number of results being returned. The default value is 3. <br>
Copy file name to clipboardExpand all lines: docs/output/markdown/installation.md
+44-12Lines changed: 44 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -284,23 +284,55 @@ To run a command in bash mode, prepend it with `openad` and make sure to escape
284
284
285
285
# AI Assistant
286
286
287
-
To enable our AI assistant, you'll need an account with OpenAI. There is a one month free trial.
287
+
To enable our AI assistant, you'll need either have access to [IBM BAM](https://bam.res.ibm.com/auth/signin) or to use a free open source LLM use [ollama](ollama.com).
288
288
289
-
This is available for IBM BAM service and Openai.
289
+
**Note:** Ollama will requires a 8gb GPU
290
290
291
291
> **Note:** watsonx coming soon
292
292
293
+
## IBM BAM Setup
293
294
For IBM BAM simply used your supplied API key if you have BAM access
294
295
295
-
For OpenAI
296
-
297
-
1. Go to [platform.openai.com](https://platform.openai.com) and create an account
298
-
299
-
2. Click on the profile icon in the top right and choose "View API keys"
300
-
301
-
3. Create a new key
302
-
303
-
4. Run `tell me` to be prompted for your OpenAI API credentials
296
+
### Run BAM LLM
297
+
run `tell me` to be prompted for your BAM API credentials
298
+
```
299
+
>> set llm bam
300
+
>> tell me <enter prompt>
301
+
```
302
+
303
+
## Ollama setup
304
+
Install ollama on your platform from [here](https://ollama.com/download)
305
+
306
+
Download appropriate models
307
+
```
308
+
ollama pull llama3:latest
309
+
ollama pull nomic-embed-text
310
+
```
311
+
312
+
Start the server if not already started
313
+
```
314
+
ollama serve
315
+
```
316
+
Thats it for local usage. If you want to run ollama remotely continue.
317
+
318
+
### Ollama remote setup with skypilot
319
+
Check out our configuration file to launch ollama on skypilot [ollama_setup.yaml](./ollama_setup.yaml)
320
+
```
321
+
sky serve up ollama_setup.yaml
322
+
```
323
+
324
+
Setup local environment variables
325
+
326
+
1. For windows `setx OLLAMA_HOST=<sky-server-ip>:11434`
327
+
2. For Linux and macos `export OLLAMA_HOST=<sky-server-ip>:11434`
328
+
3. To reset to local use `OLLAMA_HOST=0.0.0.0:11434`
329
+
330
+
### Run ollama on openad toolkit
331
+
> if prompted for api key and none was setup just leave empty
332
+
```
333
+
>> set llm ollama
334
+
>> tell me <enter prompt>
335
+
```
304
336
305
337
<br>
306
338
@@ -410,4 +442,4 @@ You will need to restart your Linux session before running `pip install openad`
410
442
411
443
If you get an error when running `init_magic`, you may first need to setup the default iPython profile for magic commands.
Copy file name to clipboardExpand all lines: openad/llm_assist/model_reference.py
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -99,24 +99,25 @@
99
99
"model": "instructlab/granite-7b-lab",
100
100
"url": OLLAMA_HOST,
101
101
"template": """You are a technical documentation writer and when responding follow the following rules:
102
-
- Format All Command Syntax, Clauses, Examples or Option Syntax in codeblock ipython Markdown
102
+
- Respond like you were writing a refernce guide for a software package
103
+
- Format All Command Syntax, Clauses, Examples or Option Syntax in codeblock ipython Markdown
103
104
- Format all Command Syntax, Options or clause quotations in codeblock ipython Markdown
104
-
- reply with all the paramters or options for a command from the help text if syntax requested
105
105
- Only format codeblocks one line at a time and place them on single lines
106
106
- For each instruction used in an answer also provide full command syntax with clauses and options in codeblock format. for example " Use the `search collection` with the 'PubChem' collection to search for papers and molecules. \n\n command: ` search collection '<collection name or key>' for '<search string>' using ( [ page_size=<int> system_id=<system_id> edit_distance=<integer> display_first=<integer>]) show (data|docs) [ estimate only|return as data|save as '<csv_filename>' ] ` \n
107
107
\n For Example: ` search collection 'PubChem' for 'Ibuprofen' show ( data ) ` \n"
108
108
- Provide All syntax, clauses, Options, Parameters and Examples separated by "\n" for a command when answering a question with no leading spaces on the line
109
-
- ensure bullet lines are indented consistently
110
109
- Compounds and Molecules are the same concept
111
-
- smiles or inchi strings are definitions of compounds or smiles
112
110
- Always explain using the full name not short form of a name
113
-
- Always list all parameters for a command
111
+
- Never refer to source files from the embeddings
114
112
- after explaning a command tell them how to go to the help using `<command> ?` substituing the command into the string
115
-
- if asked to tell the user about a command , display the commands help
113
+
- respond with a output format as per following example
114
+
'''Command: <put command syntax here >
115
+
116
+
Description: <brief description of funciton
116
117
117
-
118
-
118
+
Parameters: < Tell the user what Parameters are available for the comand>
119
119
120
+
Examples: < examples of how to use the function> '''
0 commit comments