@aj-archipelago/cortex 1.1.29 → 1.1.31

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.
@@ -44,8 +44,14 @@ const generateUniqueFolderName = () => {
44
44
 
45
45
  async function downloadFile(url, outputPath) {
46
46
  try {
47
+ let response;
48
+ try {
49
+ response = await axios.get(decodeURIComponent(url), { responseType: 'stream' });
50
+ } catch (error) {
51
+ response = await axios.get(url, { responseType: 'stream' });
52
+ }
53
+
47
54
  // Make an HTTP request for the file
48
- const response = await axios.get(decodeURIComponent(url), { responseType: 'stream' });
49
55
 
50
56
  // Create a writable file stream to save the file
51
57
  const fileStream = fs.createWriteStream(outputPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aj-archipelago/cortex",
3
- "version": "1.1.29",
3
+ "version": "1.1.31",
4
4
  "description": "Cortex is a GraphQL API for AI. It provides a simple, extensible interface for using AI services from OpenAI, Azure and others.",
5
5
  "private": false,
6
6
  "repository": {
package/server/graphql.js CHANGED
@@ -77,6 +77,7 @@ const getTypedefs = (pathways) => {
77
77
  progress: Float
78
78
  status: String
79
79
  data: String
80
+ info: String
80
81
  }
81
82
 
82
83
  type Subscription {
package/server/typeDef.js CHANGED
@@ -36,8 +36,8 @@ const typeDef = (pathway) => {
36
36
 
37
37
  const typeName = fields ? `${objName}Result` : `String`;
38
38
 
39
- const messageType = `input Message { role: String, content: String }`;
40
- const multiMessageType = `input MultiMessage { role: String, content: [String] }`;
39
+ const messageType = `input Message { role: String, content: String, name: String }`;
40
+ const multiMessageType = `input MultiMessage { role: String, content: [String], name: String }`;
41
41
 
42
42
  const type = fields ? `type ${typeName} {
43
43
  ${fieldsStr}