How I can extract information from a website URL in dialogeflow knowledge base data feature that doesn't include Q&A base format? - dialogflow-cx

In dialogeflow, We are using knowledge base data feature to extract information from a website URL.
Here are the steps, we followed:
#we have selected knowledge beta option(we have also enable beta features settings given in dialogeflow project).
We have created a new knowledge base and we are following below information to create a new document.
a. Given document name
b. Knowledge Type
c. mime type: Text/htcl
d. Data source?: URL
error image

Related

Adding reference to external PDF on FHIR resource

I am wanting to add a reference to an external/3rd party PDF datasheet with more information on a Medication resource, am I best to add this as an extension with the Url of the extension pointing to the "home page" for the datasheets, and a valueString of the URL of the PDF (the PDFs are not currently available via an API).
For example, if I wanted to reference the PDF available at the following: https://www.medicines.org.uk/emc/files/pil.9845.pdf
I'd set the Url = https://www.medicines.org.uk/emc/ and the valueString = https://www.medicines.org.uk/emc/files/pil.9845.pdf
It would be better to use valueUri rather than valueString given that it's supposed to be a reference. Your alternative would be have the extension be valueReference that points to a DocumentReference which could then give some metadata about the PDF, but if you don't have that, a simple valueUri is fine. You might also look at the MedicationKnowledge resource, as the focus there is conveying more "drug masterfile" type information. Medication is more the resource sent with the prescription or dispense to describe exactly what was prescribed/dispensed, not to convey knowledge about it.

How to access View Template Properties for Revit and compare them in Real Time?

I am trying to list the view template’s properties so we can compare them with another old template.
For example what model elements are hidden or have overrides in a given template or which Revit links have been hidden or overridden in a given template.
View Template
(https://www.google.com/search?q=view+template+revit&rlz=1C1GGRV_enUS770US770&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjLndrd2cTbAhVESq0KHX1cAPwQ_AUICygC&biw=1536&bih=824#imgrc=Q0v-pV7Nxl4kfM:)
I’m looking to devise a View Template Compare tool and access to the owner and creator of them.
public void ApplyViewTemplateToActiveView()
{
Document doc = this.ActiveUIDocument.Document;
View viewTemplate = (from v in new FilteredElementCollector(doc)
.OfClass(typeof(View))
.Cast<View>()
where v.IsTemplate == true && v.Name == "MyViewTemplate"
select v)
.First();
using (Transaction t = new Transaction(doc,"Set View Template"))
{
t.Start();
doc.ActiveView.ViewTemplateId = viewTemplate.Id;
t.Commit();
}
}
With Revit API you can access with:
GetTemplateParameterIds Method / ViewTemplateId Property
The Revit API exposes almost all the ViewTemplate properties.
For instance this method returns all the Visibility/Graphic Overrides for a specific category:
https://apidocs.co/apps/revit/2019/ed267b82-56be-6e3b-0c6d-4de7df1ed312.htm
The only thing I couldn't get for a ViewTemplate are the "includes", but all the rest seems to be there.
Update:
The list or properties "not included" can be retrieved with GetNonControlledTemplateParameterIds().
Yes, and no.
Yes, I guess you can use Forge Model Derivative API to export RVT file and then build a dashboard around the View Templates data. That's assuming that View Templates data actually gets exported when the model is translated. That data is not attached to any geometry so I would not be surprised if it was skipped. The question here is why? This is like renting a 16-wheel truck to move a duffel bag across the street.
No, if your intention is to directly interact with the RVT model. Forge can view it, but to push anything back or request changes to the model, is not available yet. Then again, I am not even sure that the view template data is available via model derivative exports.
This brings me another alternative. Why not just collect the data using Revit API, the standard way and then push it out to a Database and build on top of that? There is no reason to employ Forge for any of that.
Thanks Jeremy, I had dig into your amazing website and also some solution that Konrad post in the Dynamo Forum about this. In Revit seems pretty achievable, you filter the View that is View Template and then extracts these properties, is it correct?.
I am wondering if someone can point me in the right direction with Forge.
Some amazing guys are developing a BQL https://www.retriever.works/.
BQL(Building Query Language) is a query language for buildings, similar to how SQL is a query language for databases. It is fast and flexible. BQL helps improve efficiency for QA/QC (quality assurance and quality control), and building data extraction without leaving Revit. I am also trying these and I would like to understand if there are some works where I could start with Forge next week about this.

Using Master Document for report generation in Enterprise Architect V11 - store configuration and filters

fellows!
I have a problem with report generation from my model using a Master Document defining a complex documentation. I believe some of you can help me solve the problem.
Facts:
I have a complex project consisting of several views and packages, inluding domain model, use case model, business process model, etc.
The model is stored in shared (database) repository along with other projects.
I have created custom templates, TOC, cover page and stylesheets for the documentation.
I have created a Master Document package with the main template assigned defining the main document I want to have generated.
I have created several Model Document elements in that package to define individual chapters of the document, assigning adequate templates and model packages to each of them.
I have successfully generated the desired documentation.
I am using Enterprise Architect version 11.0.1107
Problem 1:
I would like to have generated several variants of the same documentation. Thus, I need to change the settings of the generation process like the options, exclude filters and element filters.
However, the settings is not remembered after the generation and I have to set all the settings again when generating documentation on the Master Document package.
Is there a way to save the settings for the Master Document? I have found the Report Specification element, but it does not work as expected (see Problem 2).
Problem 2:
I have tried to use Report Specification element to save the settings for the report generation. I have created that element in the same package as the Master Document is located, and also inside of that Master Document package.
In both cases, when generating the documentation for the first time, EA asked me to select the package. I selected the Master Document package and confirmed the generation. However, the generated document is empty as it clearly does not take the Model Document elements in the selected package into account.
Did I use the Report Specification incorectly? Should I use another package for the Report Specification element? Should I select another package when using the Report Specification for report generation?
Problem 3:
I tried to apply element filters and some other options to include only some of the elements in the report. Let's say I want only element with the version 1.1. So I set the filters to "version = 1.1" when generating the report from the Master Document package.
However, the report contained all elements, regardless their version. The same happened when I tried to exclude anonymous elements. Furthermore, for the next try the filter settings was lost again and I had to set it again before next generation (see Problem 1).
Where should I configure the filters? Should it be set when generating using the Master Document package? Should it be set somewhere for the Model Document elements? Should it be set in the templates (thus making them very specific rather than general)? In such case, should it be set for the model template or for the individual fragments?
Summary:
If you have any tips for combination of Master Document and Report Specification, as well as using the element filters when generating from the Master Document, I would be very grateful.
We do'nt use Report Specification element, but we store specific options into Resource Document. Use [Resource Document] button on Generate Documentation dialog. This specification is stored between Resources (see Resources Window) under Document Generation -> Defined Documents.I hope this solves problem 1 and 2
Problem 3 - EA has more ways, how select elements for generation, unfortunatelly you can't combine them (as far as I know). I would try to define custom find filter and use it.

How to serve static profile images in node

This is really more of a "using what method" than a "how-to" question. I am creating a site in NodeJS with Express. So, each user has the ability to upload a profile picture, and my concern is how to route requests for these images. A couple of questions I have are:
Can I use express.static() to serve a default file if a valid one isn't specified? If not, am I going to have to specify a GET route for /img/profileand handle the FS querying there?
How can I find the correct image if multiple file extensions are allowed? (I originally just removed the file extension and they appeared in img tags anyway, is that okay?)
I am currently naming all pictures after their user's name. Looking ahead into the future (for apps I may have to scale), what are normal naming conventions for static user content? Are most stored with a UUID referencing the content in the database?
What else should I take into consideration that I may not have accounted for yet?
First question:
At present, I'd recommend storing your images in a predictable location that can be inferred from some combination of columns or fields in your database entries. One of those fields or columns would be a filename (accounts for different extensions). Then, if they haven't uploaded an image, you just lay down in your view code a reference to the generic "has not set an image" file.
express.static obviously can server static files, but it currently doesn't have a way to serve some other file if the one you wanted isn't there. Because this sounded like fun, I made some modifications to static to support what you request and submitted a couple of pull requests (the feature touched 2 different modules):
In send: https://github.com/visionmedia/send/pull/33
In connect: https://github.com/senchalabs/connect/pull/999
I don't know if those will get included in the project, but if you want to see my forks that have these changes, they are here:
https://github.com/bigohstudios/send
https://github.com/bigohstudios/connect
If this went through, you would mount a static at the root of your profile image files:
app.use(static('<profile image files root>', { fallback: 'anon.jpg'}))
Second question
I generally store the extension in my DB, then when I load the image, I have the correct extension to put into the src attribute on the img tag.
Third question
If you can guarantee unique names, then using those would work. I prefer using the DB id or a UUID as you suggest. It's less intuitive when scanning all the image uploads, but I rarely find myself doing that. I'm usually hunting for a specific image, and I can look up the identifier for that as needed.
Fourth question
You may end up storing the static content outside your app server (e.g. on S3). If that happens, then of course static won't help you.

Drupal 7: Combining multiple content type in single view

I have a content type called Author which is referred in another two content types called Novel and Book via Node Reference Module.So we can add author entity to both Book and Novel content types.
Both Novel and Book contain another field called Release Date.
Now I want to show a block which will display the name of book and name of novel in chronological order based upon the release date when user come to that corresponding Author Page.
Ex. Suppose A is an author who is author of BookA(Release Yr-2006), NovelB(Release Yr-2004),BookC(Release Year-2009). When user come to Author A page then he will be shown a block which will show the Books/Albums in chronological order like this:-
NovelB--BookA--BookC
Please suggest as how to achieve in Drupal 7.
You want to display the following field title (I assume the book name is the node title)
For the sorting you can use the sort option in views, it is pretty self-explaining. Choose the name of your release date field.
For the connection between author and books you will have to use a contextual filter (advanced).
Add the author-reference-field from your book/novel (the field you use to refer to the author). Then choose to use a default value (2nd option) and choose content id from url. Now your block will find all nodes that refer to the page with the current page-id. Since we chose to display the title fields, you should see a list.
Note that live preview does not work here, so you will have to go to the actual page to see the result.
UPDATE:
This works when you have re-used the same field for both content types. If you have uses more then one field you will have to use an OR operator to make the contextual filter work. Thanks to d34dman the following page was given to do just that.
Although for new implementations I would recommend using the same field (eg. reference_to_author) for all references from all content types.
Yah..I am able to solve this problem by adding custom code. I have used hook_views_query_alter method and then added join relationship and where clause as per requirement. Please refer to following article for more clarity..
http://www.midwesternmac.com/blogs/jeff-geerling/filtersearch-multiple-fields
Thanks for posting the reply and keeping my hope alive.

Resources