Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
extremeheat authored Apr 19, 2024
1 parent 562acc0 commit e290f43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/functions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { CompletionService, ChatSession, Func: { Arg, Desc } } = require('../src')
const { CompletionService, ChatSession, Func: { Arg, Desc } } = require('langxlang')

// Note: you can either define an object here with the keys 'openai' and 'gemini' or you can set the OPENAI_API_KEY and GEMINI_API_KEY environment variables
// const service = new CompletionService({ openai: 'YOUR OPENAI API' })
Expand Down
2 changes: 1 addition & 1 deletion examples/streaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const service = new CompletionService()
console.log('Using cache in', service.cachePath)

async function main () {
const session = new ChatSession(service, 'gpt-3.5-turbo-16k', 'Hello', 'How are you?')
const session = new ChatSession(service, 'gpt-3.5-turbo-16k', /* system prompt */ 'Talk like a pirate')
const q = 'Why is the sky blue?'
console.log('User:', q)
await session.sendMessage(q, ({ content }) => { process.stdout.write(content) })
Expand Down

0 comments on commit e290f43

Please sign in to comment.