@convo-lang/convo-lang-pdf 0.7.44 → 0.7.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +121 -177
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,23 +1,19 @@
1
1
  # Convo-Lang
2
2
  The language of AI
3
3
 
4
- ![convo](https://raw.githubusercontent.com/convo-lang/convo-lang/refs/heads/main/assets/learn-convo-demo.webp)
4
+ ![convo](https://raw.githubusercontent.com/convo-lang/convo-lang/refs/heads/main/assets/vscode-demo.gif)
5
5
 
6
- **Interactive Demo** - [https://learn.convo-lang.ai/playground](https://learn.convo-lang.ai/playground)
7
-
8
- **Convo-Lang Tutorial** - [https://learn.convo-lang.ai/learn](https://learn.convo-lang.ai/learn)
6
+ **Lean Convo-Lang with Live Demos** - [https://learn.convo-lang.ai/learn](https://learn.convo-lang.ai/learn)
9
7
 
10
8
  **GitHub** - [ https://github.com/convo-lang/convo-lang](https://github.com/convo-lang/convo-lang)
11
9
 
12
10
  **NPM** - [https://www.npmjs.com/package/@convo-lang/convo-lang](https://www.npmjs.com/package/@convo-lang/convo-lang)
13
11
 
14
- **VSCode Extension** - [https://marketplace.visualstudio.com/items?itemName=iyio.convo-lang-tools](https://marketplace.visualstudio.com/items?itemName=iyio.convo-lang-tools)
15
-
16
12
 
17
13
  ## What is Convo-Lang?
18
- Convo-Lang is a programming language built from the ground up for prompt engineers and AI application
19
- developers. The goal of Convo-Lang is to simplify to development of LLM based applications and
20
- provided a uniform syntax for working with all LLMs.
14
+ Convo-Lang is an open source AI-native programming language and ecosystem designed specifically for
15
+ building powerful, structured prompts and agent workflows for large language models (LLMs) like
16
+ GPT-4, Claude, Llama, DeepSeek, and more.
21
17
 
22
18
  Convo-Lang is a mixture between a procedural programming language, prompting template system and
23
19
  conversation state management system. You can execute convo-lang in Javascript, Python,
@@ -30,20 +26,17 @@ The convo-lang syntax supports advanced features such as function calling, tool
30
26
  The Convo-Lang ecosystem consists of a parser, interpreter, Typescript/Javascript/Python libraries,
31
27
  a CLI, and a vscode extension for syntax highlighting and in-editor script execution.
32
28
 
33
-
34
- ## Packages
35
- - @convo-lang/convo-lang - Contains the Convo-Lang Conversation Engine, and a Typescript/Javascript library to use Convo-Lang in your application.
36
- - @convo-lang/convo-lang-react - Contains UI pre-built UI components including a fully functional chat component.
37
- - @convo-lang/convo-lang-openai - Conversation adapter for OpenAI.
38
- - @convo-lang/convo-lang-bedrock - Conversation adapter for AWS Bedrock.
39
- - @convo-lang/convo-lang-pinecone - Rag service provider using Pinecone
40
- - @convo-lang/convo-lang-aws-cdk - AWS CDK construct for deploying convo-lang compatible api endpoints
41
- - @convo-lang/convo-lang-api-routes - A backend for relaying messages between the browser and LLM backends such as OpenAI.
42
- - @convo-lang/convo-vfs - Used to integrate Convo-Lang into virtual file systems.
43
- - @convo-lang/convo-lang-cli - A CLI interface that allows you to execute and parse convo-lang files.
44
- - @convo-lang/convo-lang-tools - Contains the convo-lang vscode extension, which includes syntax highlighting,
45
- in-editor script execution, script parsing, and other helpful tools for working with convo-lang.
46
- In most cases, you will not install this package but instead install the vscode convo-lang extension.
29
+ ## Index
30
+ - [Quick Start with NextJS](#quick-start-with-nextjs)
31
+ - [VSCode extension](#vscode-extension)
32
+ - [Model Provider Support](#model-provider-support)
33
+ - [Using Convo-Lang in Javascript](#using-convo-lang-in-javascript)
34
+ - [Using the CLI](#using-the-cli)
35
+ - [CLI configuration](#cli-configuration)
36
+ - [IYIO ( eye·o )](#iyio--eyeo-)
37
+ - [Learn More](#learn-more)
38
+ - [Contact](#contact)
39
+ - [Change Log](#change-log)
47
40
 
48
41
 
49
42
  ## Quick Start with NextJS
@@ -90,9 +83,33 @@ npm run dev
90
83
  - pages/agent/weather.tsx: A weather man agent that can tell you the weather anywhere in the world
91
84
 
92
85
 
86
+ ## VSCode extension
87
+ You will also probably want to install the vscode extension for syntax highlighting and other
88
+ developer niceties. You can install the vscode extension by searching for "convo-lang" in the
89
+ vscode extension tab.
90
+
91
+ https://marketplace.visualstudio.com/items?itemName=iyio.convo-lang-tools
92
+
93
+ After installing the extension add an OpenAI or AWS Bedrock API key to run prompts directly in the editor.
94
+
95
+ ![convo](https://raw.githubusercontent.com/convo-lang/convo-lang/refs/heads/main/assets/vscode-settings.png)
96
+
97
+ With the Convo-Lang vscode extension installed and configured, you can execute convo scripts directly in vscode
98
+ by pressing the play button at the top right of a `.convo` file or using the `(CMD+R)` hotkey.
99
+
100
+ You can also run snippets of convo scripts that are embedded in other
101
+ document types. Just highlight the convo code you want to run, open the command palette, and
102
+ search for "Complete Convo Conversation" and press enter. Then the snippet will be opened in a new
103
+ convo file and completed. This is great for quick prototyping and testing prompts in your application
104
+ without having to start your full application.
105
+
106
+
93
107
  ## Model Provider Support
94
108
 
95
109
  - OpenAI - https://platform.openai.com/docs/models
110
+ - gpt-5
111
+ - gpt-5-mini
112
+ - gpt-5-nano
96
113
  - gpt-4.1
97
114
  - gpt-4
98
115
  - gpt-4-0125-preview
@@ -145,15 +162,7 @@ npm run dev
145
162
  - us.mistral.pixtral-large-2502-v1:0
146
163
 
147
164
 
148
- ## VSCode extension
149
- You will also probably want to install the vscode extension for syntax highlighting and other
150
- developer niceties. You can install the vscode extension by searching for "convo-lang" in the
151
- vscode extension tab.
152
-
153
- https://marketplace.visualstudio.com/items?itemName=iyio.convo-lang-tools
154
-
155
-
156
- ## Using Convo-Lang
165
+ ## Using Convo-Lang in Javascript
157
166
  When using Convo-Lang in a TypeScript or JavaScript project will use the Convo-Lang Conversation Engine
158
167
  by creating instances of the `Conversation` class and appending messages and awaiting the
159
168
  completion of those messages. Conversations are made up of collections of messages that represent
@@ -161,20 +170,19 @@ messages from the user, LLM, tool definitions and more.
161
170
 
162
171
  Install Convo-Lang packages
163
172
  ``` sh
164
- npm install @convo-lang/convo-lang @convo-lang/convo-lang-openai
173
+ npm install @convo-lang/convo-lang
165
174
  ```
166
175
 
167
176
  *(note - syntax highlighting for Convo-Lang embedded in string template literals is provided using the "convo-lang" VSCode extension)*
168
177
  ``` js
169
178
  // example.mjs
170
- import { Conversation } from "@convo-lang/convo-lang";
171
- import { initOpenAiBackend } from '@convo-lang/convo-lang-openai';
179
+ import { convo } from "@convo-lang/convo-lang";
180
+ import { initOpenAiBackend } from '@convo-lang/convo-lang';
172
181
 
173
182
  initOpenAiBackend();
174
- const conversation=new Conversation();
175
183
 
176
184
 
177
- await conversation.completeAsync(/*convo*/`
185
+ const planets=await convo`
178
186
  > system
179
187
  You are a super smart and funny astronomer that love make funny quotes
180
188
 
@@ -188,10 +196,10 @@ Planet = struct(
188
196
  @json Planet[]
189
197
  > user
190
198
  List the planets in our solar system
191
- `);
199
+ `;
192
200
 
193
201
 
194
- console.log(conversation.convo);
202
+ console.log(planets);
195
203
  ```
196
204
 
197
205
  ``` sh
@@ -203,9 +211,7 @@ node example.mjs
203
211
  ```
204
212
 
205
213
  Output:
206
- ``` convo
207
- @format json
208
- > assistant
214
+ ``` json
209
215
  [
210
216
  {
211
217
  "name": "Mercury",
@@ -250,125 +256,8 @@ Output:
250
256
  ]
251
257
  ```
252
258
 
253
- ## NodeJs example project
254
- The `convo-lang/convo-lang-node-example` repo contains a full featured CLI tool that can load
255
- Convo-Lang scripts, accept messages over HTTP and accept live input.
256
-
257
- https://github.com/convo-lang/convo-lang-node-example
258
-
259
- ![NextJS example](https://github.com/convo-lang/convo-lang/blob/main/assets/convo-lang-node-example.webp?raw=true)
260
-
261
-
262
-
263
- ## Using convo-lang in a existing NextJs project
264
- Follow the step below to you Convo-Lang in an existing NextJS project
265
-
266
-
267
- Install packages:
268
- ``` sh
269
- npm i \
270
- @convo-lang/convo-lang \
271
- @convo-lang/convo-lang-react \
272
- @convo-lang/convo-lang-openai \
273
- @convo-lang/convo-lang-api-routes \
274
- @iyio/nextjs-common \
275
- @iyio/react-common \
276
- @iyio/node-common
277
- ```
278
-
279
- Add API endpoint to `/pages/api/convo-lang/[convo-api-action].ts`. This API endpoint will be used
280
- to relay messages between LLMs while keep your API secrets safe.
281
- ``` ts
282
- import { createRequestHandler } from "@/lib/api-handler";
283
- import { createConvoLangApiRoutes } from "@convo-lang/convo-lang-api-routes";
284
- import { initOpenAiBackend } from '@convo-lang/convo-lang-openai';
285
-
286
- initOpenAiBackend();
287
-
288
- const routes=createConvoLangApiRoutes({prefix:'/api/convo-lang/'});
289
-
290
- const handler=createRequestHandler({routes});
291
-
292
- export default handler;
293
-
294
- ```
295
-
296
- The code below creates a fully functional chat interface with a website assistant agent
297
- ``` tsx
298
- import { ConversationView } from "@convo-lang/convo-lang-react";
299
- import { NextJsBaseLayoutView } from "@iyio/nextjs-common";
300
-
301
- // For syntax highlighting of Convo-Lang install the Convo-Lang VSCode extension.
302
- // Search for "convo-lang" in the extensions window.
303
- const exampleConvo=/*convo*/`
304
-
305
- > define
306
- agentName='Doc'
307
-
308
- > system
309
- Your name is {{agentName}} and you're helping a user navigate a website
310
-
311
- Pages:
312
- - Dashboard: path = /
313
- - Contact: path = /contact
314
- - News: path = /news
315
- - Profile: path = /users-place
316
- - Projects: path = /project-jobs
317
-
318
- > extern openPage(
319
- # Path of page to open
320
- path:string
321
- )
322
-
323
- > assistant
324
- Hi 👋, I'm {{agentName}}. I'm here to help you navigate this awesome website
325
-
326
- `
327
-
328
-
329
- export function AgentView(){
330
-
331
- return (
332
- <NextJsBaseLayoutView>
333
- <ConversationView
334
- theme="dark"
335
- showInputWithSource
336
- enabledSlashCommands
337
- template={exampleConvo}
338
- httpEndpoint="/api/convo-lang"
339
- externFunctions={{
340
- openPage:async (path:string)=>{
341
- window.history.pushState(null,'',path);
342
- },
343
- }}
344
- />
345
- </NextJsBaseLayoutView>
346
- )
347
-
348
- }
349
-
350
- ```
351
-
352
- ## NextJs example project
353
- The `convo-lang/convo-lang-nextjs-example` repo contains a fully functional example of using Convo-Lang
354
- in a NextJs project to create a collection of agents that can manipulate an interactive canvas.
355
-
356
- https://github.com/convo-lang/convo-lang-nextjs-example
357
-
358
- ![NextJS example](https://github.com/convo-lang/convo-lang/blob/main/assets/convo-lang-nextjs-example.webp?raw=true)
359
-
360
-
361
-
362
- ## Using the convo-lang extension
363
- With the convo vscode extension installed, you can execute convo scripts directly in vscode. Just
364
- press **(CMD+R)** to run a script.
365
-
366
- You can also run snippets of convo scripts that are embedded in other
367
- document types. Just highlight the convo code you want to run, open the command palette, and
368
- search for "Complete Convo Conversation" and press enter. Then the snippet will be opened in a new
369
- convo file and completed. This is great for quick prototyping and testing prompts in your application
370
- without having to start your full application.
371
259
 
260
+ ![convo](https://raw.githubusercontent.com/convo-lang/convo-lang/refs/heads/main/assets/using-convo-lang-node.png)
372
261
 
373
262
  ## Using the CLI
374
263
  The convo CLI can be used to execute convo scripts from the command line
@@ -392,25 +281,51 @@ convo talky-time.convo --out something.convo
392
281
  convo talky-time.convo --out .
393
282
  ```
394
283
 
395
- There is currently only one way to configure the convo cli and vscode extension. This will be extended
396
- soon to include reading configuration files from your current workspace.
397
-
398
-
399
- ## CLI and extension configuration
400
- To allow convo to access OpenAI, create a JSON file called ~/.config/convo/convo.json and add the
284
+ ### CLI Arguments
285
+
286
+ | argument | description |
287
+ |--------------------------|--------------------------------------------------------------------------------|
288
+ | --config | ConvoCliConfig object or path to a ConvoCliConfig file |
289
+ | --inline-config | Inline configuration as JSON |
290
+ | --source | Path to a source convo file |
291
+ | --stdin | If present, the source will be read from stdin |
292
+ | --inline | Inline convo code |
293
+ | --source-path | Used to set or overwrite the source path of executed files |
294
+ | --cmd-mode | If present, CLI operates in command mode for function calling via stdin/stdout |
295
+ | --repl | If present, CLI enters REPL mode for chat |
296
+ | --prefix-output | If present, each output line is prefixed to indicate its relation |
297
+ | --print-state | If present, prints the shared variable state |
298
+ | --print-flat | If present, prints the flattened messages |
299
+ | --print-messages | If present, prints the messages |
300
+ | --parse | If present, parses convo code and outputs as JSON instead of executing |
301
+ | --parse-format | JSON formatting used if parse option is present |
302
+ | --convert | If present, converts input to target LLM format and writes as output |
303
+ | --out | Function or path for output; if ".", writes to source path |
304
+ | --buffer-output | If present, buffers executor output for later use |
305
+ | --allow-exec | Controls shell command execution permissions |
306
+ | --prepend | Conversation content to prepend to source |
307
+ | --exe-cwd | Current working directory for context execution |
308
+ | --sync-ts-config | Path(s) to tsconfig for TypeScript project synchronization |
309
+ | --sync-watch | If present, updates TypeScript projects in real time during scan |
310
+ | --sync-out | Directory for generated sync output files |
311
+ | --spawn | Command line to run in parallel with actions like sync watching |
312
+ | --spawn-dir | Directory where spawn command runs |
313
+ | --create-next-app | If present, creates a new Next.js app using the template |
314
+ | --create-app-dir | Directory where apps will be created |
315
+ | --create-app-working-dir | Directory where the create app command will be run |
316
+ | --list-models | If present, lists all known models as JSON |
317
+
318
+ ## CLI configuration
319
+ To allow the Convo-Lang CLI to access OpenAI and other model providers, create a JSON file called ~/.config/convo/convo.json and add the
401
320
  following contents. Remember to replace the API key with your OpenAI api key.
402
321
 
403
322
  ``` json
404
323
  {
405
324
  "env":{
406
- "openAiApiKey":"YOUR_OPEN_AI_KEY",
407
- "openAiChatModel":"gpt-4o",
408
- "openAiVisionModel":"gpt-4o",
409
- "openAiAudioModel":"whisper-1",
410
- "openAiImageModel":"dall-e-3",
411
-
412
- "awsBedrockProfile":"{optional - AWS profile to use for Bedrock models}"
413
- }
325
+ "openAiApiKey":"{API key for using OpenAI models}",
326
+ "awsBedrockApiKey":"{API key for using AWS Bedrock models}"
327
+ },
328
+ "defaultModel":"{Default LLM model to use - gpt-5, gpt-4.1, claude, llama, deepseek, etc}"
414
329
  }
415
330
  ```
416
331
 
@@ -421,20 +336,49 @@ IYIO is a collection of utilities and frameworks useful for many different situa
421
336
  IYIO - https://github.com/iyioio/common
422
337
 
423
338
  ## Learn More
424
- You can check out an interactive demo of Convo-Lang here - [https://learn.convo-lang.ai/playground](https://learn.convo-lang.ai/playground)
425
339
 
426
- If you want to learn the Convo-Lang language check out this tutorial - [https://learn.convo-lang.ai/learn](https://learn.convo-lang.ai/learn)
340
+ If you want to learn the Convo-Lang language check out this tutorial - [https://learn.convo-lang.ai](https://learn.convo-lang.ai)
427
341
 
428
342
  ## Contact
429
343
 
430
344
  Email - doc@convo-lang.ai
431
345
 
432
- X - https://x.com/ConvoLang
346
+ Join our sub Reddit - https://www.reddit.com/r/ConvoLang/
433
347
 
434
348
  Join our Discord Server - https://discord.gg/GyXp8Dsa
435
349
 
350
+ X - https://x.com/ConvoLang
351
+
436
352
  ## Change Log
437
353
 
354
+ ### v0.7.45
355
+ - **VSCode Extension**: Added settings menu to vscode extension
356
+ - **VSCode extension**: Added configuration settings
357
+ - **VSCode extension**: Added buttons for executing common actions
358
+ - **VSCode extension**: Imports are now linkable
359
+ - **Error Handling**: fRead functions now catch errors for improved stability
360
+ - **AWS Bedrock**: Added support for using Bedrock API keys
361
+ - **Model Parameters**: Added model parameters that can be defined using tags or system variables
362
+ - frequencyPenalty
363
+ - presencePenalty
364
+ - logprobs
365
+ - reasoningEffort
366
+ - seed
367
+ - serviceTier
368
+ - topLogprobs
369
+ - responseVerbosity
370
+ - logitBias
371
+ - modelParams
372
+
373
+ ### v0.7.43
374
+ - **OpenAI Models**: Added OpenAI model definitions for gpt-5 and gpt-oss
375
+ - **Package Deprecation**: Marked all exports from @convo-lang/convo-lang-openai as deprecated - all OpenAI support has been moved into core package
376
+ - **Markdown & JSON Imports**: Markdown and JSON files can now be directly imported and use import templates
377
+ - **Virtual File System**: Added ConvoVfsImportService to handle imports using the virtual file system
378
+ - **HTTP Imports**: Added ConvoHttpImportService to handle imports over http
379
+ - **CLI Improvements**: Replaced the custom ConvoCli import handler with the ConvoHttpImportService and ConvoVfsImportService services
380
+ - **VSCode Extension**: Fixed issues with converting and flattening relative imports
381
+
438
382
  ### v0.7.39
439
383
  - **Bug Fix**: Replaced all uses of instanceof operator on Zod objects to fix issues with using different versions of Zod in the same project
440
384
  - **Async Functions**: Added convertAsync and flattenAsync functions to convo text template
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@convo-lang/convo-lang-pdf",
3
- "version": "0.7.44",
3
+ "version": "0.7.45",
4
4
  "sideEffects": false,
5
5
  "dependencies": {
6
6
  "@iyio/common": "^0.7.43",
@@ -12,7 +12,7 @@
12
12
  "zod": "^3.21.4"
13
13
  },
14
14
  "peerDependencies": {
15
- "@convo-lang/convo-lang": "0.7.44",
15
+ "@convo-lang/convo-lang": "0.7.45",
16
16
  "pdfjs-dist": ">=3.11"
17
17
  },
18
18
  "main": "./src/index.js",